Because we end up with VIEW_CONVERT_EXPRs in places where we do not want them. lto1: internal compiler error: in remap_decls, at tree-inline.c:576 internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'view_convert_expr' in remap_decls, at tree-inline.c:542 internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'view_convert_expr' in remove_unused_scope_block_p, at tree-ssa-live.c:450 Breaks 200.sixtrack and 191.fma3d.
Mine. It's not exactly clear how to avoid this the easies - probably keeping some state what we are walking in lto_fixup_*. In theory we'd only need to fixup the decl pointers in the reader cache so reading of the IL will pickup the VIEW_CONVERT_EXPRs.
Subject: Bug 41715 Author: rguenth Date: Fri Oct 16 14:23:22 2009 New Revision: 152903 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152903 Log: 2009-10-16 Richard Guenther <rguenther@suse.de> PR lto/41715 * lto-streamer-in.c (lto_input_tree_ref): Revert last change. (maybe_fixup_handled_component): New function. (input_gimple_stmt): Fixup mismatched decl replacements. lto/ * lto.c (lto_fixup_tree): Revert last change. * gfortran.dg/lto/20091015-1_0.f: New testcase. * gfortran.dg/lto/20091015-1_1.f: Likewise. * gfortran.dg/lto/20091015-1_2.f: Likewise. Added: trunk/gcc/testsuite/gfortran.dg/lto/20091015-1_0.f trunk/gcc/testsuite/gfortran.dg/lto/20091015-1_1.f trunk/gcc/testsuite/gfortran.dg/lto/20091015-1_2.f Modified: trunk/gcc/ChangeLog trunk/gcc/lto-streamer-in.c trunk/gcc/lto/ChangeLog trunk/gcc/lto/lto.c trunk/gcc/testsuite/ChangeLog
Fixed.