When compiling glibc for i386-gnu, I get the following error: i386-gnu-gcc vfprintf.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -Wno-parentheses -mpreferred-stack-boundary=2 -Wno-uninitialized -I../include -I. -I/home/jbailey/Programming/cvstree/glibc/build.libc-hurd/stdio-common -I.. -I../libio -I../hurd -I/home/jbailey/Programming/cvstree/glibc/build.libc-hurd/hurd/ -I../mach -I/home/jbailey/Programming/cvstree/glibc/build.libc-hurd/mach/ -I/home/jbailey/Programming/cvstree/glibc/build.libc-hurd -I../sysdeps/i386/elf -I../sysdeps/mach/hurd/i386 -I../sysdeps/mach/hurd -I../sysdeps/gnu -I../sysdeps/unix/bsd/bsd4.4 -I../sysdeps/unix/mman -I../sysdeps/mach/i386 -I../sysdeps/mach -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/unix/bsd -I../sysdeps/unix/common -I../sysdeps/unix/inet -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -D_LIBC_REENTRANT -include ../include/libc-symbols.h -D_IO_MTSAFE_IO -o /home/jbailey/Programming/cvstree/glibc/build.libc-hurd/stdio-common/vfprintf.o -MD -MP -MF /home/jbailey/Programming/cvstree/glibc/build.libc-hurd/stdio-common/vfprintf.o.dt vfprintf.c: In function `_IO_vfprintf': vfprintf.c:1917: internal compiler error: in loc_descriptor_from_tree, at dwarf2out.c:8780 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. With the proprocessed source, the bug triggers as: $ i386-gnu-gcc -O1 -g -c foo.c -O2 triggers too. I'll try to test a native compile, or one targetted to i386-linux. I suspect this will show up on at least one of those.
Created attachment 5080 [details] Preprocessed source Preprocessed source for vfprintf.c
Just to say this also happens on i686-pc-linux-gnu.
The testcase can be reduced to =========================================== inline int foo() { return 0; } void bar() { int buf[foo()]; } =========================================== which fails on i686-pc-linux-gnu with "gcc -O -g": bug.c: In function `bar': bug.c:6: internal compiler error: in loc_descriptor_from_tree, at dwarf2out.c:8780 Please submit a full bug report, [etc.] The bug only affects mainline. According to Phil's regression hunter it appeared between 2003-04-11-trunk (#264) and 2003-04-12-trunk (#265) (although I had to specify -O2 for the search).
The regression appeared with Zack's patch http://gcc.gnu.org/ml/gcc-cvs/2003-04/msg00555.html Zack, could you please have a look? Thanks!
One more for you Zack.
For the record, this bug is also present on i386-unknown-freebsd4.8, built from today's mainline: test.cc: In function `void bar()': test.cc:6: internal compiler error: in loc_descriptor_from_tree, at dwarf2out.c:8800 Reading specs from /data/development/jw/gcc3/bin/../lib/gcc/i386-unknown-freebsd4.8/3.4.0/specs Configured with: /home/jw/src/extcvs/gcc/configure --prefix=/home/jw/gcc3/ --enable-languages=c,c++ --enable-concept-checks --enable-libstdcxx-pch Thread model: posix gcc version 3.4.0 20031230 (experimental)
Actually Zack, I do not think this one is really yours, see PR 13815. The regression happened before your change. It just so happens that your change also causes some other problems.
*** Bug 13815 has been marked as a duplicate of this bug. ***
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01514.html>.
Subject: Bug 12934 CVSROOT: /cvs/gcc Module name: gcc Changes by: pbrook@gcc.gnu.org 2004-02-18 11:11:25 Modified files: gcc : ChangeLog gcc/testsuite : ChangeLog gcc/testsuite/gcc.dg/debug: debug-7.c Log message: Fix previous checkin. PR debug/12934 * dwarf2out.c (loc_descriptor_from_tree): Handle EXPR_WITH_FILE_LOCATION. testsuite/ * gcc.dg/debug/debug-7.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.2819&r2=2.2820 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3514&r2=1.3515 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/debug-7.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
Subject: Bug 12934 CVSROOT: /cvs/gcc Module name: gcc Branch: csl-arm-branch Changes by: pbrook@gcc.gnu.org 2004-02-18 11:23:28 Modified files: gcc : ChangeLog dwarf2out.c gcc/testsuite : ChangeLog Log message: PR debug/12934 * dwarf2out.c (loc_descriptor_from_tree): Handle EXPR_WITH_FILE_LOCATION. testsuite/ * gcc.dg/debug/debug-7.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=2.1568.2.33&r2=2.1568.2.34 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.461.2.2&r2=1.461.2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.3146.2.9&r2=1.3146.2.10
Subject: Bug 12934 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: pbrook@gcc.gnu.org 2004-02-18 11:24:51 Modified files: gcc : ChangeLog dwarf2out.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg/debug: debug-7.c Log message: PR debug/12934 * dwarf2out.c (loc_descriptor_from_tree): Handle EXPR_WITH_FILE_LOCATION. testsuite/ * gcc.dg/debug/debug-7.c: New test. 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.211&r2=2.2326.2.212 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.478.2.4&r2=1.478.2.5 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.88&r2=1.3389.2.89 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/debug-7.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.2.2.1
Fixed.