Commit 4c29307d by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/37084 (ICE in gimple_assign_rhs1)

	PR tree-optimization/37084
	* tree-inline.c (copy_bb): Call gimple_regimplify_operands
	if id->regimplify, don't assume stmt is a cast assignment.

	* g++.dg/tree-ssa/pr37084.C: New test.

From-SVN: r139028
parent d0259b01
2008-08-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/37084
* tree-inline.c (copy_bb): Call gimple_regimplify_operands
if id->regimplify, don't assume stmt is a cast assignment.
2008-08-12 Anatoly Sokolov <aesok@post.ru> 2008-08-12 Anatoly Sokolov <aesok@post.ru>
* final.c (final_scan_insn): Use app_enable/app_disable functions. * final.c (final_scan_insn): Use app_enable/app_disable functions.
......
2008-08-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/37084
* g++.dg/tree-ssa/pr37084.C: New test.
2008-08-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> 2008-08-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* gcc.c-torture/execute/20031003-1.c (main): Update test to * gcc.c-torture/execute/20031003-1.c (main): Update test to
......
// PR tree-optimization/37084
// { dg-do compile }
// { dg-options "-O" }
struct A
{
A ();
};
inline A
foo ()
{
return A ();
}
const A a (foo ());
...@@ -1260,10 +1260,9 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, ...@@ -1260,10 +1260,9 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
/* With return slot optimization we can end up with /* With return slot optimization we can end up with
non-gimple (foo *)&this->m, fix that here. */ non-gimple (foo *)&this->m, fix that here. */
if ((is_gimple_assign (stmt) if (is_gimple_assign (stmt)
&& gimple_assign_rhs_code (stmt) == NOP_EXPR && gimple_assign_rhs_code (stmt) == NOP_EXPR
&& !is_gimple_val (gimple_assign_rhs1 (stmt))) && !is_gimple_val (gimple_assign_rhs1 (stmt)))
|| id->regimplify)
{ {
tree new_rhs; tree new_rhs;
new_rhs = force_gimple_operand_gsi (&copy_gsi, new_rhs = force_gimple_operand_gsi (&copy_gsi,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment