Bug 45500 - ICE: in rtl_for_decl_init, at dwarf2out.c:16307 with -g -msse and using v16qi
Summary: ICE: in rtl_for_decl_init, at dwarf2out.c:16307 with -g -msse and using v16qi
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 15:19 UTC by Zdenek Sojka
Modified: 2010-09-03 10:50 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail: 4.5.1 4.6.0
Last reconfirmed: 2010-09-02 17:12:43


Attachments
gcc46-pr45500.patch (652 bytes, patch)
2010-09-02 18:33 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-09-02 15:19:03 UTC
Compiler output:
$ gcc -O -g -msse testcase.c  
testcase.c:2:1: internal compiler error: in rtl_for_decl_init, at dwarf2out.c:16307
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

I wasn't able to reproduce this at x86_64-linux-gnu with -m32.

Tested revisions:
r163723 - crash
20100821 - crash
20100814 - crash

----- testcase.c -----
typedef char v16qi __attribute__ ((__vector_size__ (16)));
static const v16qi search = { '\n', '\r', '?', '\\' };
----------------------
(reduced from libcpp/lex.c)

The crash goes away when I add -msse2 or -msse4 or when I remove -msse.
Comment 1 Zdenek Sojka 2010-09-02 16:32:59 UTC
Note this breaks bootstrap with BOOT_CFLAGS="-march=athlon-4 -O2":

$ make BOOT_CFLAGS="-march=athlon-4 -O2"
...
/root/build-163760-lto-fortran-checking-yes-rtl-df/./prev-gcc/xgcc -B/root/build-163760-lto-fortran-checking-yes-rtl-df/./prev-gcc/ -B/mnt/svn/gcc-trunk/binary-163760-x86-lto-fortran-checking-yes-rtl-df/i686-pc-linux-gnu/bin/ -B/mnt/svn/gcc-trunk/binary-163760-x86-lto-fortran-checking-yes-rtl-df/i686-pc-linux-gnu/bin/ -B/mnt/svn/gcc-trunk/binary-163760-x86-lto-fortran-checking-yes-rtl-df/i686-pc-linux-gnu/lib/ -isystem /mnt/svn/gcc-trunk/binary-163760-x86-lto-fortran-checking-yes-rtl-df/i686-pc-linux-gnu/include -isystem /mnt/svn/gcc-trunk/binary-163760-x86-lto-fortran-checking-yes-rtl-df/i686-pc-linux-gnu/sys-include     -I/usr/portage/distfiles/svn-src/gcc/trunk/libcpp -I. -I/usr/portage/distfiles/svn-src/gcc/trunk/libcpp/../include -I/usr/portage/distfiles/svn-src/gcc/trunk/libcpp/include  -march=athlon-4 -O2 -gtoggle -W -Wall -Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wc++-compat -pedantic -Wno-long-long -Werror -I/usr/portage/distfiles/svn-src/gcc/trunk/libcpp -I. -I/usr/portage/distfiles/svn-src/gcc/trunk/libcpp/../include -I/usr/portage/distfiles/svn-src/gcc/trunk/libcpp/include  -c -o lex.o -MT lex.o -MMD -MP -MF .deps/lex.Tpo /usr/portage/distfiles/svn-src/gcc/trunk/libcpp/lex.c
/usr/portage/distfiles/svn-src/gcc/trunk/libcpp/lex.c:2838:1: internal compiler error: in rtl_for_decl_init, at dwarf2out.c:16307
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [lex.o] Error 1
make[3]: Leaving directory `/root/build-163760-lto-fortran-checking-yes-rtl-df/libcpp'
make[2]: *** [all-stage2-libcpp] Error 2
make[2]: Leaving directory `/root/build-163760-lto-fortran-checking-yes-rtl-df'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/root/build-163760-lto-fortran-checking-yes-rtl-df'
make: *** [all] Error 2
Comment 2 Jakub Jelinek 2010-09-02 18:33:40 UTC
Created attachment 21677 [details]
gcc46-pr45500.patch

Untested fix.
Comment 3 Jakub Jelinek 2010-09-03 09:54:14 UTC
Subject: Bug 45500

Author: jakub
Date: Fri Sep  3 09:53:44 2010
New Revision: 163803

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163803
Log:
	PR debug/45500
	* dwarf2out.c (rtl_for_decl_init): Give up for all generic vectors,
	not just generic vectors with BLKmode.

	* gcc.target/i386/pr45500.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr45500.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Jakub Jelinek 2010-09-03 10:15:02 UTC
Subject: Bug 45500

Author: jakub
Date: Fri Sep  3 10:14:43 2010
New Revision: 163807

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163807
Log:
	PR debug/45500
	* dwarf2out.c (rtl_for_decl_init): Give up for all generic vectors,
	not just generic vectors with BLKmode.

	* gcc.target/i386/pr45500.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr45500.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/dwarf2out.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog

Comment 5 Jakub Jelinek 2010-09-03 10:50:34 UTC
Fixed.