aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-coalesce.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-01-22 16:07:36 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-01-22 16:07:36 +0000
commitf4b05e74683b0fbb323606875010006ee0dc557e (patch)
tree6606604045ae104f5614d2103de2594f53f0f248 /gcc/tree-ssa-coalesce.c
parent98321768552dffe06a24315a06df5ac18d8d0bd8 (diff)
downloadgcc-f4b05e74683b0fbb323606875010006ee0dc557e.zip
gcc-f4b05e74683b0fbb323606875010006ee0dc557e.tar.gz
gcc-f4b05e74683b0fbb323606875010006ee0dc557e.tar.bz2
re PR tree-optimization/64728 (internal compiler error: SSA corruption)
2015-01-22 Richard Biener <rguenther@suse.de> PR middle-end/64728 * tree-ssa-coalesce.c (coalesce_partitions): Do not perform abnormal coalescing on undefined SSA names. * gcc.dg/torture/pr64728.c: New testcase. From-SVN: r220003
Diffstat (limited to 'gcc/tree-ssa-coalesce.c')
-rw-r--r--gcc/tree-ssa-coalesce.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-ssa-coalesce.c b/gcc/tree-ssa-coalesce.c
index fda79dc..be696fe 100644
--- a/gcc/tree-ssa-coalesce.c
+++ b/gcc/tree-ssa-coalesce.c
@@ -1213,8 +1213,13 @@ coalesce_partitions (var_map map, ssa_conflicts_p graph, coalesce_list_p cl,
gsi_next (&gsi))
{
gphi *phi = gsi.phi ();
+ tree arg = PHI_ARG_DEF (phi, e->dest_idx);
+ if (SSA_NAME_IS_DEFAULT_DEF (arg)
+ && (!SSA_NAME_VAR (arg)
+ || TREE_CODE (SSA_NAME_VAR (arg)) != PARM_DECL))
+ continue;
+
tree res = PHI_RESULT (phi);
- tree arg = PHI_ARG_DEF (phi, e->dest_idx);
int v1 = SSA_NAME_VERSION (res);
int v2 = SSA_NAME_VERSION (arg);