Bug 45382 - internal compiler error: tree code ‘call_expr’ is not supported in gimple streams
Summary: internal compiler error: tree code ‘call_expr’ is not supported in gimple str...
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, lto
Depends on:
Blocks:
 
Reported: 2010-08-22 22:00 UTC by Matt Turner
Modified: 2016-09-26 14:18 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Known to work: 4.6.0
Known to fail: 4.5.0, 4.5.1
Last reconfirmed: 2010-10-14 15:33:17


Attachments
SmallStrings.i from webkit-gtk-1.2.3 (130.35 KB, application/x-gzip)
2010-08-22 22:01 UTC, Matt Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Turner 2010-08-22 22:00:38 UTC
# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.5.1/work/gcc-4.5.1/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.1 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.1/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --disable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.5.1/python --enable-checking=release --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.1 p1.0, pie-0.4.5'
Thread model: posix
gcc version 4.5.1 (Gentoo 4.5.1 p1.0, pie-0.4.5)

Building the attached preprocessed file, I can cause an ICE
# g++ -flto -c SmallStrings.i -o SmallStrings.o
JavaScriptCore/runtime/SmallStrings.cpp:141:1: internal compiler error: tree code ‘call_expr’ is not supported in gimple streams
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.

The file is from webkit-gtk-1.2.3.
Comment 1 Matt Turner 2010-08-22 22:01:27 UTC
Created attachment 21546 [details]
SmallStrings.i from webkit-gtk-1.2.3
Comment 2 Jakub Jelinek 2010-08-23 10:09:51 UTC
Smaller testcase:

template<class T, unsigned long l>
inline unsigned long foo (T (&)[l]) { return l; }

struct S { char *s[4]; S (); };

S::S () { typedef int T[foo (s) == 4 ? 1 : -1]; }
Comment 3 Jakub Jelinek 2010-08-23 10:16:32 UTC
As can be seen in
inline unsigned long foo () { return 4; }
struct S { S (); };
void bar () { typedef int T[foo () == 4 ? 1 : -1]; }
S::S () { typedef int T[foo () == 4 ? 1 : -1]; }
the problem only happens in cdtors, thus probably related to the cdtor duplication.
Comment 4 Richard Biener 2010-10-14 15:31:42 UTC
Author: rguenth
Date: Thu Oct 14 15:31:36 2010
New Revision: 165471

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165471
Log:
2010-10-14  Richard Guenther  <rguenther@suse.de>

	PR lto/45382
	* g++.dg/lto/20101014-2_0.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/lto/20101014-2_0.C
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 5 Richard Biener 2010-10-14 15:33:17 UTC
Works on trunk.
Comment 6 Paolo Carlini 2011-09-23 12:42:38 UTC
Let's close this.