Bug 45565 - [4.6 Regression] ICE: in execute_todo, at passes.c:1276 with -fno-toplevel-reorder -fno-inline -fipa-cp-clone -fkeep-inline-functions
Summary: [4.6 Regression] ICE: in execute_todo, at passes.c:1276 with -fno-toplevel-re...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.0
: P1 normal
Target Milestone: 4.6.0
Assignee: Martin Jambor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 21:48 UTC by Zdenek Sojka
Modified: 2010-09-23 12:39 UTC (History)
3 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-09-22 18:18:35


Attachments
reduced testcase (from g++.dg/torture/pr42450.C) (176 bytes, text/plain)
2010-09-06 21:49 UTC, Zdenek Sojka
Details
Proposed fix (1.29 KB, patch)
2010-09-22 18:20 UTC, Martin Jambor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2010-09-06 21:48:37 UTC
Command line:
$ gcc -O -fno-toplevel-reorder -fno-inline -fipa-cp -fipa-cp-clone -fkeep-inline-functions testcase.C

Compiler output:
$ gcc -O -fno-toplevel-reorder -fno-inline -fipa-cp -fipa-cp-clone -fkeep-inline-functions testcase.C 
testcase.C: In constructor 'Matrix::Matrix(AnyMatrixBase<OtherDerived>) [with OtherDerived = Matrix]':
testcase.C:19:31: internal compiler error: in execute_todo, at passes.c:1276
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r163921 - crash
r163636 - crash
r161659 - OK
Comment 1 Zdenek Sojka 2010-09-06 21:49:37 UTC
Created attachment 21717 [details]
reduced testcase (from g++.dg/torture/pr42450.C)

$ gcc -O -fno-toplevel-reorder -fno-inline -fipa-cp -fipa-cp-clone -fkeep-inline-functions pr45565.C
Comment 2 Martin Jambor 2010-09-22 18:18:35 UTC
I have a patch.
Comment 3 Martin Jambor 2010-09-22 18:20:37 UTC
Created attachment 21863 [details]
Proposed fix
Comment 4 Richard Biener 2010-09-23 12:39:45 UTC
Fixed.
Comment 5 Richard Biener 2010-09-23 12:39:51 UTC
Subject: Bug 45565

Author: rguenth
Date: Thu Sep 23 12:39:26 2010
New Revision: 164561

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164561
Log:
2010-09-23  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45565
	* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee):
	Make sure to adjust the fndecl before replacing the stmt.

	* g++.dg/ipa/pr45565.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/ipa/pr45565.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cgraphunit.c
    trunk/gcc/testsuite/ChangeLog