Bug 43850 - ice: tree code �template_type_parm� is not supported in gimple streams
Summary: ice: tree code �template_type_parm� is not supported in gimple streams
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, lto
: 45968 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-22 12:53 UTC by morandini
Modified: 2021-08-25 23:02 UTC (History)
5 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail: 4.5.1
Last reconfirmed: 2010-04-22 15:17:15


Attachments
preprocessed file triggering the bug (164.65 KB, application/x-gzip)
2010-04-22 12:55 UTC, morandini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description morandini 2010-04-22 12:53:50 UTC
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
Comment 1 morandini 2010-04-22 12:55:57 UTC
Created attachment 20462 [details]
preprocessed file triggering the bug
Comment 2 Richard Biener 2010-04-22 15:17:02 UTC
Confirmed.
Comment 3 Richard Biener 2010-04-22 15:17:15 UTC
I will have a looksee.
Comment 4 Richard Biener 2010-04-22 15:22:10 UTC
It's TYPE_ARG_TYPES of a FUNCTION_TYPE when writing the FUNCTION_DECL of
void_cast_register which isn't instantiated.

Reducing.
Comment 5 Richard Biener 2010-04-22 15:40:19 UTC
Reduced testcase:

template <class T> void void_cast_register(T *) __attribute__ ((used));
template <class T> void void_cast_register(T *) { }

Comment 6 Richard Biener 2010-04-22 15:41:09 UTC
Frontend bug.
Comment 7 Richard Biener 2010-07-22 14:19:54 UTC
Fixed on trunk.
Comment 8 Richard Biener 2010-07-22 14:19:58 UTC
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

Comment 9 Matt Turner 2010-08-22 22:02:39 UTC
Can this code be backported to the 4.5 branch?
Comment 10 Andrea Bigagli 2010-09-02 22:38:14 UTC
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
Comment 11 Andrew Pinski 2010-09-02 22:40:52 UTC
(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.
Comment 12 Andrew Pinski 2021-08-25 23:02:30 UTC
*** Bug 45968 has been marked as a duplicate of this bug. ***