aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2012-10-03 20:34:26 +0000
committerDehao Chen <dehao@gcc.gnu.org>2012-10-03 20:34:26 +0000
commit846b158cd9da478584980fff99df3dc25c459240 (patch)
tree4a579419a4353ff8c0b438f225eb6280de6ef94b /gcc/tree-cfg.c
parent9ce3692aeb1b59604c8677313ed8ecc4435c926e (diff)
downloadgcc-846b158cd9da478584980fff99df3dc25c459240.zip
gcc-846b158cd9da478584980fff99df3dc25c459240.tar.gz
gcc-846b158cd9da478584980fff99df3dc25c459240.tar.bz2
re PR middle-end/54782 (ICE: in change_scope, at final.c:1543 with -O -ffast-math -ftree-parallelize-loops=2 -g)
2012-10-03 Dehao Chen <dehao@google.com> gcc: PR middle-end/54782 * tree-cfg.c (move_block_to_fn): Update lexical block for phi_args. testsuite: PR middle-end/54782 * gcc.dg/pr54782.c: New test. From-SVN: r192049
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index b14a3b9..af277b7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -6322,6 +6322,7 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
use_operand_p use;
tree op = PHI_RESULT (phi);
ssa_op_iter oi;
+ unsigned i;
if (virtual_operand_p (op))
{
@@ -6340,6 +6341,23 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
SET_USE (use, replace_ssa_name (op, d->vars_map, dest_cfun->decl));
}
+ for (i = 0; i < EDGE_COUNT (bb->preds); i++)
+ {
+ location_t locus = gimple_phi_arg_location (phi, i);
+ tree block = LOCATION_BLOCK (locus);
+
+ if (locus == UNKNOWN_LOCATION)
+ continue;
+ if (d->orig_block == NULL_TREE || block == d->orig_block)
+ {
+ if (d->new_block == NULL_TREE)
+ locus = LOCATION_LOCUS (locus);
+ else
+ locus = COMBINE_LOCATION_DATA (line_table, locus, d->new_block);
+ gimple_phi_arg_set_location (phi, i, locus);
+ }
+ }
+
gsi_next (&si);
}