Bug 41715 - VIEW_CONVERT_EXPR use for mismatched prevailing decl replacement doesn't work
Summary: VIEW_CONVERT_EXPR use for mismatched prevailing decl replacement doesn't work
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-10-15 12:39 UTC by Richard Biener
Modified: 2009-10-16 14:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-10-15 12:41:57


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2009-10-15 12:39:49 UTC
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.
Comment 1 Richard Biener 2009-10-15 12:41:56 UTC
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.
Comment 2 Richard Biener 2009-10-16 14:23:47 UTC
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

Comment 3 Richard Biener 2009-10-16 14:23:53 UTC
Fixed.