Commit 5ffcd779 by Andrew Pinski Committed by Andrew Pinski

pointer-reference-alias.C: New test.

2004-09-14  Andrew Pinski  <apinski@apple.com>

        * g++.dg/tree-ssa/pointer-reference-alias.C: New test.

2004-09-14  Andrew Pinski  <apinski@apple.com>

        * tree-ssa-copy.c (may_propagate_copy): Don't check the aliasing
        sets of the pointers but the aliasing sets of what they point to.

From-SVN: r87527
parent 798e5365
2004-09-14 Andrew Pinski <apinski@apple.com>
* tree-ssa-copy.c (may_propagate_copy): Don't check the aliasing
sets of the pointers but the aliasing sets of what they point to.
2004-09-14 Roger Sayle <roger@eyesopen.com> 2004-09-14 Roger Sayle <roger@eyesopen.com>
PR rtl-optimization/9771 PR rtl-optimization/9771
......
2004-09-14 Andrew Pinski <apinski@apple.com>
* g++.dg/tree-ssa/pointer-reference-alias.C: New test.
2004-09-14 Roger Sayle <roger@eyesopen.com> 2004-09-14 Roger Sayle <roger@eyesopen.com>
PR rtl-optimization/9771 PR rtl-optimization/9771
......
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-vars" } */
int f(int *a)
{
int &b = *a;
b = 0;
return *a;
}
/* There should be only one dereferencing of a. */
/* { dg-final { scan-tree-dump-times "\\*a" 1 "vars"} } */
...@@ -112,8 +112,8 @@ may_propagate_copy (tree dest, tree orig) ...@@ -112,8 +112,8 @@ may_propagate_copy (tree dest, tree orig)
return false; return false;
else if (!lang_hooks.types_compatible_p (type_d, type_o)) else if (!lang_hooks.types_compatible_p (type_d, type_o))
return false; return false;
else if (!alias_sets_conflict_p (get_alias_set (type_d), else if (!alias_sets_conflict_p (get_alias_set (TREE_TYPE (type_d)),
get_alias_set (type_o))) get_alias_set (TREE_TYPE (type_o))))
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment