marco@pc-31c:~/Hmfe/Fields2> gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/marco/local/gcc-4.5.0/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --enable-threads=posix --prefix=/home/marco/local/gcc-4.5.0 --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --with-cpu=opteron --enable-languages=c,c++,fortran --with-mpfr=/home/marco/local/mpfr-2.4.2 --with-mpc=/home/marco/local/mpc-0.8.1 --enable-gold --enable-lto Thread model: posix gcc version 4.5.0 (GCC) Error: marco@pc-31c:~/Hmfe/Fields2> g++ -c -flto Tensor1st.ii /home/marco/Hmfe/HelMo/Src/GeoMathLib/Tensor1st.C:233:2: internal compiler error: tree code ‘template_type_parm’ is not supported in gimple streams
Created attachment 20462 [details] preprocessed file triggering the bug
Confirmed.
I will have a looksee.
It's TYPE_ARG_TYPES of a FUNCTION_TYPE when writing the FUNCTION_DECL of void_cast_register which isn't instantiated. Reducing.
Reduced testcase: template <class T> void void_cast_register(T *) __attribute__ ((used)); template <class T> void void_cast_register(T *) { }
Frontend bug.
Fixed on trunk.
Subject: Bug 43850 Author: rguenth Date: Thu Jul 22 14:19:40 2010 New Revision: 162416 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162416 Log: 2010-07-22 Richard Guenther <rguenther@suse.de> PR lto/43850 * g++.dg/lto/20100722-1_0.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/lto/20100722-1_0.C Modified: trunk/gcc/testsuite/ChangeLog
Can this code be backported to the 4.5 branch?
What is the changeset that fixed this on trunk? I'd really need to try to patch my 4.5.1 if possible bcs this bug is a showstopper for me
(In reply to comment #10) > What is the changeset that fixed this on trunk? I'd really need to try to patch > my 4.5.1 if possible bcs this bug is a showstopper for me LTO is an experimental feature for 4.5.x. That is it has been tested but there could be some bugs in it. It is designed to be able to test it and see the improvements that are coming.
*** Bug 45968 has been marked as a duplicate of this bug. ***