The internal compiler bug on legal code similar to bug 15342. This bug manifest itself on specific combination of two functions accessing structure fields and containing more return paths. If one of the functions is moved into separate file, error seems to disappear. arm-linux-gcc --pipe -B/opt/rtems/arm-rtems/csb336/lib/ \ -mcpu=arm920 -mstructure-size-boundary=8 -msoft-float \ -g -Wall -O3 -g \ -o icetest1.o \ -c icetest1.c icetest1.c: In function `sui_get_event': icetest1.c:172: internal compiler error: in verify_local_live_at_start, at flow.c:546 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Experienced on next x86 to ARM GCC builds GCC 3.4.1 and GCC 3.4.2 ./configure --target=arm-rtems --prefix=/usr --with-cpu=arm9 \ --enable-languages=c,c++ --with-gnu-ld --with-float=soft \ --enable-threads=rtems --enable-target-optspace --verbose \ --disable-nls --host=i586-pc-linux-gnu --with-newlib Thread model: rtems gcc version 3.4.2 GCC 3.4.1 ./configure --target=arm-linux --prefix=/usr --with-cpu=arm9 \ --enable-languages=c,c++ --with-gnu-ld --enable-shared --enable-symvers=gnu \ --with-float=soft --enable-threads=posix --enable-__cxa_atexit \ --enable-target-optspace --verbose --disable-nls --host=i586-pc-linux-gnu \ --with-headers=/usr/src/linux-2.6.8-rc1-arm/include Thread model: posix gcc version 3.4.1 Attached reprocessed sources length reduced form original 3150 lines to 173 lines. More attempt to simplify code even more lead to compilation without errors.
Created attachment 7270 [details] partially simplified test case arm-linux-gcc -mcpu=arm920 -msoft-float -g -Wall -O3 -g -o icetest1.o -c icetest1.c or arm-rtems-gcc -mcpu=arm920 -msoft-float -g -Wall -O3 -g -o icetest1.o -c icetest1.c
/* slightly reduced testcase, use '-mcpu=arm920 -O3' */ struct sui_event; typedef struct sui_event { unsigned short what; int abrakadabra [3]; } sui_event_t; static sui_event_t sui_event_buf; static sui_event_t sui_global_event_buf; short draw_request; int sui_get_uid_event () { int rc; if (rc < 0) return rc; return 0; } int sui_get_event (sui_event_t *event, int k) { if (k != 0) { *event = sui_event_buf; sui_event_buf.what = 0; return 0; } if (sui_global_event_buf.what != 0) { *event = sui_global_event_buf; return 0; } memset (event, 0, sizeof (sui_event_t)); if (sui_get_uid_event () > 0) return 1; if (draw_request) { draw_request = 0; return 1; } return 0; }
Neither icetest1 nor the reduced test case fails with gcc 4.0.0 20050124 when targeting arm-rtems4.7.
Seeing the same bug with gcc 3.4.2 on armv4b when compiling x.org 6.8.1. This does not happen with gcc 3.3.4. slicer.cc: In function `void triangulateRect(Arc*, Backend&, int, int, int)': slicer.cc:382: internal compiler error: in verify_local_live_at_start, at flow.c:546
http://sources.redhat.com/ml/crossgcc/2005-05/msg00154.html is a report of a similar problem with gcc-3.4.3. xfree86-4.5.0's fontutils.c causes an ICE when compiled with -O3 -fno-strict-aliasing. Backing down to xfree86-4.4.0, or using -O2, or not using -no-strict-aliasing, or using gcc-4.0.0, makes the problem go away. I'll attach a reduced testcase. To reproduce, do $ arm-unknown-linux-gnu-gcc -O3 -fno-strict-aliasing -c fontutils.i Error is fontutils.i:44: internal compiler error: in verify_local_live_at_start, at flow.c:546 Is this the same problem, or should I file a new report?
Created attachment 8940 [details] reduced testcase from xfree86-4.5.0
Subject: Bug 17810 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: rearnsha@gcc.gnu.org 2005-09-01 13:09:08 Modified files: gcc : ChangeLog regrename.c Log message: PR rtl-optimization/17810 Backport 2004-11-04 Richard Sandiford <rsandifo@redhat.com> PR target/15342 * regrename.c (scan_rtx): Treat the destinations of SETs and CLOBBERs as OP_INOUT if the instruction is predicated. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.910&r2=2.2326.2.911 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/regrename.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.73.2.1&r2=1.73.2.2
Really a dup of 15342. Fixed for 3.4.5 *** This bug has been marked as a duplicate of 15342 ***
Subject: Bug 17810 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: rearnsha@gcc.gnu.org 2005-09-01 14:54:24 Modified files: gcc : ChangeLog regrename.c Log message: PR rtl-optimization/17810 target/15342 * regrename.c: Fix polluted patch in previous change. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.911&r2=2.2326.2.912 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/regrename.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.73.2.2&r2=1.73.2.3
Hi, I used and Xfree86-4.4 and 4.5 with gcc-3.4.3 But both the time it is giving same problem as slicer.cc: In function `void triangulateRect(Arc*, Backend&, int, int, int)': slicer.cc:382: internal compiler error: in verify_local_live_at_start, at flow.c:546 What could be the problem. Thanks Regards, Harsha (In reply to comment #5) > http://sources.redhat.com/ml/crossgcc/2005-05/msg00154.html > is a report of a similar problem with > gcc-3.4.3. xfree86-4.5.0's fontutils.c causes an ICE when > compiled with -O3 -fno-strict-aliasing. Backing down to xfree86-4.4.0, > or using -O2, or not using -no-strict-aliasing, or using gcc-4.0.0, > makes the problem go away. I'll attach a reduced testcase. > To reproduce, do > $ arm-unknown-linux-gnu-gcc -O3 -fno-strict-aliasing -c fontutils.i > Error is > fontutils.i:44: internal compiler error: in verify_local_live_at_start, at > flow.c:546 > > Is this the same problem, or should I file a new report?
*** Bug 28805 has been marked as a duplicate of this bug. ***