When I try to compile any of these functions below, GCC 3.4.4 hangs the whole computer! I was needed to reboot my Feodore Core3 system - severe memory leak? I'm compiling on a Linux machine running Feodore Core3 kernel 2.6.9. The compiler is arm-elf-gcc-3.4.4 compiled with binutils-2.16.1, newlib-1.13.0. I compiled binutils like this: "../../$BINUTILS_DIR/configure" --target="$TARGET" --prefix="$DEST" --disable-nls make LDFLAGS=-s all install I compiled GCC like this: "../../$GCC_DIR/configure" --enable-languages=c,c++,f77 --target="$TARGET" --prefix="$DEST" --with-gnu-as --with-gnu-ld --with-newlib --disable-nls make LDFLAGS=-s all-gcc all-target-libstdc++-v3 install-gcc install-target-libstdc++-v3 The code that hangs the compiler looks like this: (Simplified stupid code example just to show the error.) void hang_compiler1(signed long long x) { while (1) { if (x < 0) continue; } } void hang_compiler2(signed long long x) { for (;;) { if (x < 0) continue; } } void hang_compiler3(signed long long x) { do { if (x < 0) continue; } while (1); }
This bug only shows when you compile with -O3
Confirmed. This seems to be a problem with loop unswitching
*** Bug 24322 has been marked as a duplicate of this bug. ***
unlikely to be fixed for 3.4.6
Ouch. PalmSource/Access bug 111534.