re PR tree-optimization/45709 (internal compiler error: in add_phi_arg, at tree-phinodes.c:395)
2010-09-18 Richard Guenther <rguenther@suse.de> PR tree-optimization/45709 * tree-inline.c (copy_phis_for_bb): Fixup new_edge when we splitted it. * g++.dg/torture/pr45709.C: New testcase. From-SVN: r164390
This commit is contained in:
parent
5d3b14bd9a
commit
a9db10d4aa
@ -1,3 +1,9 @@
|
||||
2010-09-18 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/45709
|
||||
* tree-inline.c (copy_phis_for_bb): Fixup new_edge when
|
||||
we splitted it.
|
||||
|
||||
2010-09-17 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* graphite-dependences.c (dot_deps): Add DEBUG_FUNCTION.
|
||||
|
19
gcc/testsuite/g++.dg/torture/pr45709.C
Normal file
19
gcc/testsuite/g++.dg/torture/pr45709.C
Normal file
@ -0,0 +1,19 @@
|
||||
// { dg-do compile }
|
||||
|
||||
struct Region {
|
||||
int storage[4];
|
||||
int count;
|
||||
};
|
||||
static inline Region subtract(int lhs)
|
||||
{
|
||||
Region reg;
|
||||
int* storage = reg.storage;
|
||||
if (lhs > 0)
|
||||
storage++;
|
||||
reg.count = storage - reg.storage;
|
||||
return reg;
|
||||
}
|
||||
void bar(int a)
|
||||
{
|
||||
const Region copyBack(subtract(a));
|
||||
}
|
@ -2021,8 +2021,11 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
|
||||
&& !is_gimple_val (new_arg))
|
||||
{
|
||||
gimple_seq stmts = NULL;
|
||||
basic_block tem;
|
||||
new_arg = force_gimple_operand (new_arg, &stmts, true, NULL);
|
||||
gsi_insert_seq_on_edge_immediate (new_edge, stmts);
|
||||
tem = gsi_insert_seq_on_edge_immediate (new_edge, stmts);
|
||||
if (tem)
|
||||
new_edge = single_succ_edge (tem);
|
||||
}
|
||||
add_phi_arg (new_phi, new_arg, new_edge,
|
||||
gimple_phi_arg_location_from_edge (phi, old_edge));
|
||||
|
Loading…
x
Reference in New Issue
Block a user