/* ICE using gcc-4.2-20060506 on x86_64-unknown-linux-gnu Regression from gcc-4.1.0 Source cut down from gmp-4.2.1/tests/refmpf.c % gcc-4.2-20060506 -O3 -c foo.c foo.c: In function âfooâ: foo.c:27: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. % % gcc-4.2-20060506 -O2 -c foo.c % % gcc-4.2-20060506 -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /home/kate/test/gcc-4.2-20060506/configure --enable-languages=c --prefix=/home/kate/test/bin/x86_64-Linux Thread model: posix gcc version 4.2.0 20060506 (experimental) % % % gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /usr/local/gcc-4.1.0/src/gcc-4.1.0/configure --enable-languages=c,c++ --prefix=/usr/local/gcc-4.1.0/x86_64-Linux-g++ Thread model: posix gcc version 4.1.0 % % gcc -O3 -c foo.c % */ #include <stdlib.h> typedef struct { int a; } strt; typedef strt *ptr; void foo (ptr w, int u, int v) { int b; if (u == 0) { b = v > 0; goto done; } if (v == 0) { b = u < 0; } done: w->a = b == 0 ? 1 : -1; }
Oh, this is no longer a regression as -fsee is not enabled by default in newer versions of 4.2 (a day after it was enabled by default for -O3, it was turned off to fix some regressions at -O3).
Can you still reproduce this bug with the most recent mainline? I am having trouble reproducing this bug.
Confirmed with -O3 -fsee.
*** This bug has been marked as a duplicate of 27437 ***