public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
@ 2012-01-29 1:31 marbacz at gmail dot com
2012-01-29 1:34 ` [Bug c++/52035] " marbacz at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: marbacz at gmail dot com @ 2012-01-29 1:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
Bug #: 52035
Summary: internal compiler error: tree code
‘template_type_parm’ is not supported in LTO streams
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: marbacz@gmail.com
Using GCC from svn (183666) I get an ICE while compiling QtCore with -flto:
~ # g++ -flto bug.ii
bug.ii:44:1: internal compiler error: tree code ‘template_type_parm’ is not
supported in LTO streams
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
~ # g++ --version
g++ (svn 183666-20120128) 4.7.0 20120128 (experimental)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
@ 2012-01-29 1:34 ` marbacz at gmail dot com
2012-01-29 11:12 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marbacz at gmail dot com @ 2012-01-29 1:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
--- Comment #1 from Marcin Baczyński <marbacz at gmail dot com> 2012-01-29 00:46:58 UTC ---
Created attachment 26497
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26497
Reduced test case.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
2012-01-29 1:34 ` [Bug c++/52035] " marbacz at gmail dot com
@ 2012-01-29 11:12 ` pinskia at gcc dot gnu.org
2012-01-30 9:42 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-29 11:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code, lto
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-29
Ever Confirmed|0 |1
Severity|major |normal
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-29 04:51:02 UTC ---
Confirmed, reduced testcase:
template <typename T> struct QVector {
typedef T* iterator;
static void insert(int n);
typedef int size_type;
};
template <typename T> void QVector<T>::insert(size_type n) {}
void error()
{
int n;
QVector<int>::insert(n);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
2012-01-29 1:34 ` [Bug c++/52035] " marbacz at gmail dot com
2012-01-29 11:12 ` pinskia at gcc dot gnu.org
@ 2012-01-30 9:42 ` rguenth at gcc dot gnu.org
2012-02-01 23:39 ` marbacz at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-30 9:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-30 09:34:37 UTC ---
We're writing a function decl:
<function_decl 0x7ffff5b9b200 insert
type <function_type 0x7ffff5b8cbd0
type <void_type 0x7ffff5a36bd0 void type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff5a36bd0
pointer_to_this <pointer_type 0x7ffff5a36c78>>
QI
size <integer_cst 0x7ffff5a39120 constant 8>
unit size <integer_cst 0x7ffff5a39140 constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7ffff5a54000
arg-types <tree_list 0x7ffff5b89960 value <integer_type 0x7ffff5b8c9d8
size_type>
chain <tree_list 0x7ffff5a289b0 value <void_type 0x7ffff5a36bd0
void>>>
pointer_to_this <pointer_type 0x7ffff5b9c888>>
addressable used nothrow public static weak decl_1 decl_5 decl_6 QI
defer-output file t.C line 6 col 28 align 16 context <record_type
0x7ffff5b9c348 QVector> initial <block 0x7ffff5ba00f0>
arguments <parm_decl 0x7ffff5a267f8 n
type <integer_type 0x7ffff5b8c9d8 size_type sizes-gimplified type_6 SI
size <integer_cst 0x7ffff5a392e0 constant 32>
unit size <integer_cst 0x7ffff5a39300 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x7ffff5a365e8
precision 32 min <integer_cst 0x7ffff5a39280 -2147483648> max <integer_cst
0x7ffff5a392a0 2147483647>>
SI file t.C line 6 col 57 size <integer_cst 0x7ffff5a392e0 32> unit
size <integer_cst 0x7ffff5a39300 4>
align 32 context <function_decl 0x7ffff5b9b200 insert>
arg-type <integer_type 0x7ffff5b8c9d8 size_type>>
result <result_decl 0x7ffff5b9d100 D.2212 type <void_type 0x7ffff5a36bd0
void>
ignored VOID file t.C line 6 col 28
align 8 context <function_decl 0x7ffff5b9b200 insert>>
full-name "static void QVector<T>::insert(QVector<T>::size_type) [with T =
int; QVector<T>::size_type = int]"
pending-inline-info 0x7ffff5b9e1e0 template-info 0x7ffff5b97940
struct-function 0x7ffff5a29320>
from there its type, its argument type chain, the first arguments type-name,
its context
<record_type 0x7ffff5b8c690 QVector type_0 type_5 type_6 VOID
size <integer_cst 0x7ffff5a39000 type <integer_type 0x7ffff5a360a8
bitsizetype> constant 0>
unit size <integer_cst 0x7ffff5a1dfa0 type <integer_type 0x7ffff5a36000
sizetype> constant 0>
align 8 symtab 0 alias set -1 canonical type 0x7ffff5b8c690
fields <type_decl 0x7ffff5b85b80 QVector
type <record_type 0x7ffff5b8c738 QVector type_5 VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff5b8c690
full-name "struct QVector<T>"
n_parents=0 use_template=0 interface-unknown
chain <type_decl 0x7ffff5b85a10 QVector>>
nonlocal decl_4 VOID file t.C line 1 col 38
align 1 context <record_type 0x7ffff5b8c690 QVector> result
<record_type 0x7ffff5b8c690 QVector>
chain <type_decl 0x7ffff5b85cf0 iterator type <pointer_type
0x7ffff5b8c888 iterator>
nonlocal VOID file t.C line 2 col 20
align 1 context <record_type 0x7ffff5b8c690 QVector> result
<pointer_type 0x7ffff5b8c7e0>
>>
full-name "struct QVector<T>"
n_parents=0 use_template=0 interface-unknown
pointer_to_this <pointer_type 0x7ffff5b8cdc8> chain <type_decl
0x7ffff5b85a10 QVector>>
its type fields and then one of its types:
<pointer_type 0x7ffff5b8c888 iterator
type <template_type_parm 0x7ffff5b8c5e8 T type_0 type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7ffff5b8c5e8
index 0 level 1 orig_level 1
pointer_to_this <pointer_type 0x7ffff5b8c7e0> chain <type_decl
0x7ffff5b85958 T>>
unsigned DI
size <integer_cst 0x7ffff5a1df60 type <integer_type 0x7ffff5a360a8
bitsizetype> constant 64>
unit size <integer_cst 0x7ffff5a1df80 type <integer_type 0x7ffff5a36000
sizetype> constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7ffff5b8c7e0>
Not sure if it's a but that the DECL_CONTEXT ends up in an uninstantiated
template?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
` (2 preceding siblings ...)
2012-01-30 9:42 ` rguenth at gcc dot gnu.org
@ 2012-02-01 23:39 ` marbacz at gmail dot com
2012-02-06 21:29 ` [Bug c++/52035] [4.7 regression] " jason at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marbacz at gmail dot com @ 2012-02-01 23:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
Marcin Baczyński <marbacz at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.6.2
--- Comment #4 from Marcin Baczyński <marbacz at gmail dot com> 2012-02-01 23:39:38 UTC ---
I think this should be marked as a 4.7 regression. I just tested 4.6.2 and it
works.
gcc version 4.6.2 (Gentoo 4.6.2 p1.3, pie-0.5.0)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] [4.7 regression] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
` (3 preceding siblings ...)
2012-02-01 23:39 ` marbacz at gmail dot com
@ 2012-02-06 21:29 ` jason at gcc dot gnu.org
2012-02-06 23:45 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2012-02-06 21:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-02-06 21:28:32 UTC ---
The problem here is that when we go to instantiate QVector<int>, we step
through the members in order. When we instantiate the declaration of insert,
we're using the declaration from the out-of-class definition, which uses the
size_type typedef. But we haven't instantiated size_type yet, so tsubst thinks
that we're instantiating it now, and we end up just returning the version from
the template.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] [4.7 regression] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
` (4 preceding siblings ...)
2012-02-06 21:29 ` [Bug c++/52035] [4.7 regression] " jason at gcc dot gnu.org
@ 2012-02-06 23:45 ` jason at gcc dot gnu.org
2012-02-08 9:53 ` jason at gcc dot gnu.org
2012-02-08 22:47 ` paolo.carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2012-02-06 23:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] [4.7 regression] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
` (5 preceding siblings ...)
2012-02-06 23:45 ` jason at gcc dot gnu.org
@ 2012-02-08 9:53 ` jason at gcc dot gnu.org
2012-02-08 22:47 ` paolo.carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2012-02-08 9:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2012-02-08 09:52:15 UTC ---
Author: jason
Date: Wed Feb 8 09:52:11 2012
New Revision: 184000
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184000
Log:
PR c++/52035
* pt.c (tsubst): Strip uninstantiated typedef.
Added:
trunk/gcc/testsuite/g++.dg/lto/pr52035_0.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/lto/README
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/52035] [4.7 regression] internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
` (6 preceding siblings ...)
2012-02-08 9:53 ` jason at gcc dot gnu.org
@ 2012-02-08 22:47 ` paolo.carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-02-08 22:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52035
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-02-08 22:47:12 UTC ---
Confirmed fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-02-08 22:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 1:31 [Bug c++/52035] New: internal compiler error: tree code ‘template_type_parm’ is not supported in LTO streams marbacz at gmail dot com
2012-01-29 1:34 ` [Bug c++/52035] " marbacz at gmail dot com
2012-01-29 11:12 ` pinskia at gcc dot gnu.org
2012-01-30 9:42 ` rguenth at gcc dot gnu.org
2012-02-01 23:39 ` marbacz at gmail dot com
2012-02-06 21:29 ` [Bug c++/52035] [4.7 regression] " jason at gcc dot gnu.org
2012-02-06 23:45 ` jason at gcc dot gnu.org
2012-02-08 9:53 ` jason at gcc dot gnu.org
2012-02-08 22:47 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).