diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2005-11-08 16:34:48 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2005-11-08 16:34:48 +0000 |
commit | 973162ec9dd144e6637a9fc775c3e9ce308b054c (patch) | |
tree | b44d278762551161178f033b428dfde8fea6c404 /gcc/testsuite/gcc.dg | |
parent | e5f51638541b06c1f10707c89a9699419eb77933 (diff) | |
download | gcc-973162ec9dd144e6637a9fc775c3e9ce308b054c.zip gcc-973162ec9dd144e6637a9fc775c3e9ce308b054c.tar.gz gcc-973162ec9dd144e6637a9fc775c3e9ce308b054c.tar.bz2 |
re PR tree-optimization/23382 (Does not remove the old HEAP virtual variables in clobbered)
2005-11-08 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/23382
* tree-ssa-alias.c (compute_may_aliases): Call
delete_old_heap_vars.
* tree-dfa.c (referenced_var_remove): New function.
* tree-ssa.c (delete_tree_ssa): Call delete_old_heap_vars.
* tree-flow.h (referenced_var_remove): Add prototype.
(delete_old_heap_vars): Ditto.
* tree-ssa-structalias.c (heapvars): New variable.
(oldheapvars): Ditto.
(get_constraint_for): Put heap vars on heapvars list.
(delete_old_heap_vars): New function.
From-SVN: r106643
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr23382.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr23382.c b/gcc/testsuite/gcc.dg/tree-ssa/pr23382.c new file mode 100644 index 0000000..eeeb0ff --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr23382.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-alias-vops" } */ +struct a +{ + int length; + int a1[256]; +}; + +void *malloc(long size) __attribute__((malloc)); + +void f(void) +{ + struct a *a = malloc(sizeof(struct a)); +} +/* { dg-final { scan-tree-dump-times "V_MAY_DEF <HEAP" 1 "alias1"} } */ +/* { dg-final { scan-tree-dump-times "V_MAY_DEF <HEAP" 1 "alias2"} } */ +/* { dg-final { scan-tree-dump-times "V_MAY_DEF <HEAP" 1 "alias3"} } */ +/* { dg-final { scan-tree-dump-times "V_MAY_DEF <HEAP" 1 "alias4"} } */ +/* { dg-final { scan-tree-dump-times "V_MAY_DEF <HEAP" 1 "alias5"} } */ +/* { dg-final { cleanup-tree-dump "alias1" } } */ +/* { dg-final { cleanup-tree-dump "alias2" } } */ +/* { dg-final { cleanup-tree-dump "alias3" } } */ +/* { dg-final { cleanup-tree-dump "alias4" } } */ +/* { dg-final { cleanup-tree-dump "alias5" } } */ |