re PR middle-end/45565 (ICE: in execute_todo, at passes.c:1276 with -fno-toplevel-reorder -fno-inline -fipa-cp-clone -fkeep-inline-functions)
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. From-SVN: r164561
This commit is contained in:
parent
bef6486a5a
commit
3d11339491
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
||||
2010-09-23 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/45750
|
||||
|
|
|
@ -2159,6 +2159,7 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
|
|||
new_stmt
|
||||
= gimple_call_copy_skip_args (e->call_stmt,
|
||||
e->callee->clone.combined_args_to_skip);
|
||||
gimple_call_set_fndecl (new_stmt, e->callee->decl);
|
||||
|
||||
if (gimple_vdef (new_stmt)
|
||||
&& TREE_CODE (gimple_vdef (new_stmt)) == SSA_NAME)
|
||||
|
@ -2168,10 +2169,11 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
|
|||
gsi_replace (&gsi, new_stmt, true);
|
||||
}
|
||||
else
|
||||
new_stmt = e->call_stmt;
|
||||
|
||||
gimple_call_set_fndecl (new_stmt, e->callee->decl);
|
||||
update_stmt (new_stmt);
|
||||
{
|
||||
new_stmt = e->call_stmt;
|
||||
gimple_call_set_fndecl (new_stmt, e->callee->decl);
|
||||
update_stmt (new_stmt);
|
||||
}
|
||||
|
||||
cgraph_set_call_stmt_including_clones (e->caller, e->call_stmt, new_stmt);
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-09-23 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/45565
|
||||
* g++.dg/ipa/pr45565.C: New testcase.
|
||||
|
||||
2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/45745
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// { dg-do compile }
|
||||
// { dg-options "-O -fno-toplevel-reorder -fno-inline -fipa-cp -fipa-cp-clone -fkeep-inline-functions" }
|
||||
|
||||
template < typename Derived > struct AnyMatrixBase
|
||||
{
|
||||
};
|
||||
|
||||
struct Matrix Random ();
|
||||
|
||||
struct Matrix:AnyMatrixBase < Matrix >
|
||||
{
|
||||
void bar ()
|
||||
{
|
||||
throw;
|
||||
}
|
||||
void foo (Matrix other)
|
||||
{
|
||||
bar ();
|
||||
Matrix (AnyMatrixBase < Matrix > (Random ()));
|
||||
}
|
||||
template
|
||||
< typename OtherDerived > Matrix (AnyMatrixBase < OtherDerived > other)
|
||||
{
|
||||
foo (other);
|
||||
}
|
||||
};
|
||||
|
||||
Matrix x (Random ());
|
||||
|
Loading…
Reference in New Issue