[Bug c++/51992] [4.7 Regression] internal compiler error: tree code ‘target_expr’ is not supported in LTO streams

2012-01-25 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51992

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Jason Merrill  2012-01-25 
17:23:51 UTC ---
Fixed.


[Bug c++/51992] [4.7 Regression] internal compiler error: tree code ‘target_expr’ is not supported in LTO streams

2012-01-25 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51992

--- Comment #2 from Jason Merrill  2012-01-25 
17:16:39 UTC ---
Author: jason
Date: Wed Jan 25 17:16:28 2012
New Revision: 183527

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183527
Log:
PR c++/51992
* tree.c (find_decls_types_in_node): Walk gimple_call_fntype.

Added:
trunk/gcc/testsuite/g++.dg/lto/pr51992_0.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c


[Bug c++/51992] [4.7 Regression] internal compiler error: tree code ‘target_expr’ is not supported in LTO streams

2012-01-25 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51992

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |


[Bug c++/51992] [4.7 Regression] internal compiler error: tree code ‘target_expr’ is not supported in LTO streams

2012-01-25 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51992

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Keywords||lto
   Last reconfirmed||2012-01-25
  Component|lto |c++
 CC||jason at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
 Ever Confirmed|0   |1
Summary|internal compiler error:|[4.7 Regression] internal
   |tree code ‘target_expr’ is  |compiler error: tree code
   |not supported in LTO|‘target_expr’ is not
   |streams |supported in LTO streams
   Target Milestone|--- |4.7.0

--- Comment #1 from Richard Guenther  2012-01-25 
10:27:01 UTC ---
Confirmed.  Happens when we stream a function type:

 
unit size 
align 8 symtab 0 alias set -1 canonical type 0x75ba1498
fields 
external nonlocal suppress-debug decl_4 VOID file t.ii line 20 col
18
align 8 context  result

   >
full-name "KSharedConfig::Ptr"
X() X(constX&) this=(X&) n_parents=0 use_template=1 interface-unknown
pointer_to_this  chain >
QI size  unit size 
align 8 symtab 0 alias set -1 canonical type 0x75ba1a80
arg-types 
unsigned DI
size 
unit size 
align 64 symtab 0 alias set -1 canonical type 0x75ba1930>
chain 
side-effects arg 0 
arg 1 
constant lngt 0>> value >>
pointer_to_this >

The 2nd argument type has TREE_PURPOSE set.

Jason, any idea where that comes from?  Do we forget to clear it during
template instantiation somehow?

Works on the 4.6 branch.