diff options
author | Diego Novillo <dnovillo@redhat.com> | 2005-06-30 00:51:17 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2005-06-29 20:51:17 -0400 |
commit | 674391b8f1380a53613fd3254d61a759072bdad0 (patch) | |
tree | dd909a5c023477ac7df3eee31bc872951a8da4f6 /gcc/tree-ssa-copy.c | |
parent | acb8f2123d5a627e6c5dad2e78fd57d2bd6c6fb1 (diff) | |
download | gcc-674391b8f1380a53613fd3254d61a759072bdad0.tar.gz |
re PR tree-optimization/22234 (verify_ssa failed with -fno-exceptions)
PR 22234
* tree-ssa-copy.c (fini_copy_prop): Do not overwrite copy_of
when following copy-of chains.
testsuite/ChangeLog
PR 22234
* gcc.dg/20050629-1.c: New test.
From-SVN: r101450
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r-- | gcc/tree-ssa-copy.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 11da27a0222..71119608237 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -885,20 +885,24 @@ static void fini_copy_prop (void) { size_t i; + prop_value_t *tmp; /* Set the final copy-of value for each variable by traversing the copy-of chains. */ + tmp = xmalloc (num_ssa_names * sizeof (*tmp)); + memset (tmp, 0, num_ssa_names * sizeof (*tmp)); for (i = 1; i < num_ssa_names; i++) { tree var = ssa_name (i); if (var && copy_of[i].value && copy_of[i].value != var) - copy_of[i].value = get_last_copy_of (var); + tmp[i].value = get_last_copy_of (var); } - substitute_and_fold (copy_of, false); + substitute_and_fold (tmp, false); free (cached_last_copy_of); free (copy_of); + free (tmp); } |