diff options
author | Richard Guenther <rguenther@suse.de> | 2012-09-24 08:57:08 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-09-24 08:57:08 +0000 |
commit | 483ef49f9a3b2079bea28358185391a79ebf4fa7 (patch) | |
tree | 51aecd8b2f2c3befb06643fdb25f37d339b19690 /gcc/gimple.c | |
parent | dd9b0e0d28bac4ac782b980fa15ad1a8501d9add (diff) | |
download | gcc-483ef49f9a3b2079bea28358185391a79ebf4fa7.zip gcc-483ef49f9a3b2079bea28358185391a79ebf4fa7.tar.gz gcc-483ef49f9a3b2079bea28358185391a79ebf4fa7.tar.bz2 |
re PR middle-end/52173 (internal compiler error: verify_ssa failed possibly caused by itm)
2012-09-24 Richard Guenther <rguenther@suse.de>
PR middle-end/52173
* gimple.c (gimple_copy): Properly mark the copy modified
if SSA operands are present.
* gcc.dg/tm/pr52173-1.c: New.
* gcc.dg/tm/pr52173-2.c: New.
From-SVN: r191658
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 7065040..6088682 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2333,23 +2333,20 @@ gimple_copy (gimple stmt) } /* Make copy of operands. */ - if (num_ops > 0) - { - for (i = 0; i < num_ops; i++) - gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i))); + for (i = 0; i < num_ops; i++) + gimple_set_op (copy, i, unshare_expr (gimple_op (stmt, i))); - /* Clear out SSA operand vectors on COPY. */ - if (gimple_has_ops (stmt)) - { - gimple_set_def_ops (copy, NULL); - gimple_set_use_ops (copy, NULL); - } + if (gimple_has_mem_ops (stmt)) + { + gimple_set_vdef (copy, gimple_vdef (stmt)); + gimple_set_vuse (copy, gimple_vuse (stmt)); + } - if (gimple_has_mem_ops (stmt)) - { - gimple_set_vdef (copy, gimple_vdef (stmt)); - gimple_set_vuse (copy, gimple_vuse (stmt)); - } + /* Clear out SSA operand vectors on COPY. */ + if (gimple_has_ops (stmt)) + { + gimple_set_def_ops (copy, NULL); + gimple_set_use_ops (copy, NULL); /* SSA operands need to be updated. */ gimple_set_modified (copy, true); |