Some files *.c generated by mercury compiler (http://www.cs.mu.oz.au/mercury/) cause ICE on gcc 3.3 and 3.3.1 if any optimization is used (-O, -O2, -O3), at least on x86. (mercury preprocesses his *.m files, creating *.c files, which are compiled using gcc; that's why this file looks so ugly). Compiler output: tree234.c: In function `tree234_module66': tree234.c:23795: internal compiler error: in flow_loops_find, at cfgloop.c:830 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Environment: System: Linux builder 2.4.20 #1 Sat May 24 09:07:12 UTC 2003 i686 unknown unknown PLD Linux Architecture: i686 (Athlon CPU, Linux 2.4.20, glibc 2.3.2) host: i686-pld-linux-gnu build: i686-pld-linux-gnu target: i686-pld-linux-gnu configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++,f77,ksi --enable-c99 --enable-long-long --enable-multilib --enable-nls --with-gnu-as --with-gnu-ld --with-system-zlib --with-slibdir=/lib --without-x i686-pld-linux How-To-Repeat: Try to compile attached file (which is preprocessed file that comes from mercury source distribution - mercury-compiler-0.11.0/library/tree234.c) with any optimizations enabled (-O, -O2, -O3), e.g.: $ gcc -c tree234.i -O tree234.c: In function `tree234_module66': tree234.c:23795: internal compiler error: in flow_loops_find, at cfgloop.c:830 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $
Most likely related to bug 11496. We need the preprocessed source file.
Created attachment 4592 [details] Preprocessed source that triggers ICE Uh, it seems that gccbug-to-bugzilla interface has cut this file...
"fix" section has been cut too, so here it is: Workaround is not to use optimizations (use -O0 or no -O options): $ gcc tree234.i -c -O0 $
Marking as invalid and marking this as ...
unconfirmed since I have not reduced this yet. This only effects 3.3.x, not 3.4. I am sure that the patch which broke PR 11496 broke this one too.
See this still on gcc 3.3 branch (20030824). Would it be at all possible to make a smaller testcase? This one is, erhm, large and ugly.
Still occurs; since it seems to be loop related, I will take care of it.
In mainline fixed by http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01106.html The patch should also be safe for inclusion in 3.3 branch.
Patch commited to 3.3 branch.
*** Bug 12861 has been marked as a duplicate of this bug. ***
*** Bug 16906 has been marked as a duplicate of this bug. ***