I know its not helpful at all, but I cannot localize the bug, only reproduce it
My app has several static inline void subroutine (void) as compiler hints.
It compiles flawlessly, also with gcc
But whenever I select Project Options Compiler Optimizations in combination with Inlining the program goes into an endless loop until it crashes.
However with either Optimizations None or Inlining None, it runs as expected.