http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54598
Bug #: 54598
Summary: ICE: Segmentation fault in lto1 at
tree-streamer-in.c:unpack_ts_fixed_cst_value_fields()
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, lto
Severity: normal
Priority: P3
Component: lto
AssignedTo: [email protected]
ReportedBy: [email protected]
Target: avr
Created attachment 28199
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28199
lto1-const_fixed-ice.c: C test case
== C Test Case ==
_Fract zero_r (_Fract r)
{
if (r < 0r)
return 0r;
return r;
}
int main (void)
{
return 0;
}
== Command Line ==
$ avr-gcc lto1-const_fixed-ice.c -flto -v
There are also more complicated test cases in the gcc test suite that trigger
this ICE, cf. http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01020.html
== Configure ==
The following dump is from a build=i686-linux-gnu host=i386-mingw32 canadian
cross, but I also get the ICE with native x86-linux cross compiler, just omit
--host= and --build=.
Target: avr
Configured with: ../../gcc.gnu.org/trunk/configure --target=avr
--prefix=/local/gnu/install/gcc-4.8-mingw32 --host=i386-mingw32
--build=i686-linux-gnu --enable-languages=c,c++ --disable-nls --disable-shared
--with-dwarf2
Thread model: single
gcc version 4.8.0 20120915 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-flto' '-v'
GNU C (GCC) version 4.8.0 20120915 (experimental) (avr)
compiled by GNU C version 3.4.5 (mingw-vista special r2), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.2
COLLECT_GCC_OPTIONS='-c' '-v'
'-fltrans-output-list=c:\Temp\cc8RcTpj.ltrans.out' '-fltrans' '-o'
'c:\Temp\cc8RcTpj.ltrans0.ltrans.o'
e:/winavr/4.8_2012-09-15/lib/gcc/../../libexec/gcc/avr/4.8.0/lto1.exe -quiet
-dumpbase cc8RcTpj.ltrans0.o -auxbase-strip c:\Temp\cc8RcTpj.ltrans0.ltrans.o
-version -fltrans-output-list=c:\Temp\cc8RcTpj.ltrans.out -fltrans
@c:\Temp\ccIimPk0 -o c:\Temp\ccgryuvQ.s
GNU GIMPLE (GCC) version 4.8.0 20120915 (experimental) (avr)
compiled by GNU C version 3.4.5 (mingw-vista special r2), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (GCC) version 4.8.0 20120915 (experimental) (avr)
compiled by GNU C version 3.4.5 (mingw-vista special r2), GMP version
4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
In function 'zero_r':
lto1.exe: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: e:/WinAVR/4.8_2012-09-15/bin/avr-gcc returned 1 exit status
e:/winavr/4.8_2012-09-15/bin/../lib/gcc/avr/4.8.0/../../../../avr/bin/ld.exe:
lto-wrapper failed
collect2.exe: error: ld returned 1 exit status