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
This commit is contained in:
parent
d0259b010b
commit
4c29307df9
4 changed files with 30 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* final.c (final_scan_insn): Use app_enable/app_disable functions.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
* gcc.c-torture/execute/20031003-1.c (main): Update test to
|
||||
|
|
16
gcc/testsuite/g++.dg/tree-ssa/pr37084.C
Normal file
16
gcc/testsuite/g++.dg/tree-ssa/pr37084.C
Normal file
|
@ -0,0 +1,16 @@
|
|||
// 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,
|
|||
|
||||
/* With return slot optimization we can end up with
|
||||
non-gimple (foo *)&this->m, fix that here. */
|
||||
if ((is_gimple_assign (stmt)
|
||||
&& gimple_assign_rhs_code (stmt) == NOP_EXPR
|
||||
&& !is_gimple_val (gimple_assign_rhs1 (stmt)))
|
||||
|| id->regimplify)
|
||||
if (is_gimple_assign (stmt)
|
||||
&& gimple_assign_rhs_code (stmt) == NOP_EXPR
|
||||
&& !is_gimple_val (gimple_assign_rhs1 (stmt)))
|
||||
{
|
||||
tree new_rhs;
|
||||
new_rhs = force_gimple_operand_gsi (©_gsi,
|
||||
|
|
Loading…
Add table
Reference in a new issue