mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 16:01:00 +08:00
re PR middle-end/37456 (ICE: verify_flow_info failed: control flow in the middle of basic block)
2008-09-18 Richard Guenther <rguenther@suse.de> PR tree-optimization/37456 * tree-ssa-reassoc.c (build_and_add_sum): If the stmt we want to insert after ends a BB insert on the single fallthru outgoing edge. * testsuite/g++.dg/torture/pr37456.C: New testcase. From-SVN: r140449
This commit is contained in:
parent
59a1bff3e2
commit
e7089ecf1c
@ -1,3 +1,10 @@
|
||||
2008-09-18 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/37456
|
||||
* tree-ssa-reassoc.c (build_and_add_sum): If the stmt we
|
||||
want to insert after ends a BB insert on the single fallthru
|
||||
outgoing edge.
|
||||
|
||||
2008-09-18 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
|
||||
* doc/invoke.texi: Document -mhard-dfp, -mno-hard-dfp.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-09-18 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/37456
|
||||
* testsuite/g++.dg/torture/pr37456.C: New testcase.
|
||||
|
||||
2008-09-18 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR rtl-optimization/37544
|
||||
|
14
gcc/testsuite/g++.dg/torture/pr37456.C
Normal file
14
gcc/testsuite/g++.dg/torture/pr37456.C
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
int zot(int);
|
||||
struct bar {
|
||||
~bar() { }
|
||||
};
|
||||
int x;
|
||||
void doit(int a, int b, int c)
|
||||
{
|
||||
bar pn;
|
||||
int b1 = zot(a) * c;
|
||||
int b2 = zot(b) * c;
|
||||
x = b1 + b2;
|
||||
}
|
@ -859,8 +859,20 @@ build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
|
||||
}
|
||||
else
|
||||
{
|
||||
gsi = gsi_for_stmt (op2def);
|
||||
gsi_insert_after (&gsi, sum, GSI_NEW_STMT);
|
||||
if (!stmt_ends_bb_p (op2def))
|
||||
{
|
||||
gsi = gsi_for_stmt (op2def);
|
||||
gsi_insert_after (&gsi, sum, GSI_NEW_STMT);
|
||||
}
|
||||
else
|
||||
{
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
|
||||
FOR_EACH_EDGE (e, ei, gimple_bb (op2def)->succs)
|
||||
if (e->flags & EDGE_FALLTHRU)
|
||||
gsi_insert_on_edge_immediate (e, sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -872,8 +884,20 @@ build_and_add_sum (tree tmpvar, tree op1, tree op2, enum tree_code opcode)
|
||||
}
|
||||
else
|
||||
{
|
||||
gsi = gsi_for_stmt (op1def);
|
||||
gsi_insert_after (&gsi, sum, GSI_NEW_STMT);
|
||||
if (!stmt_ends_bb_p (op1def))
|
||||
{
|
||||
gsi = gsi_for_stmt (op1def);
|
||||
gsi_insert_after (&gsi, sum, GSI_NEW_STMT);
|
||||
}
|
||||
else
|
||||
{
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
|
||||
FOR_EACH_EDGE (e, ei, gimple_bb (op1def)->succs)
|
||||
if (e->flags & EDGE_FALLTHRU)
|
||||
gsi_insert_on_edge_immediate (e, sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
update_stmt (sum);
|
||||
|
Loading…
x
Reference in New Issue
Block a user