summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-23 14:08:25 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-23 14:08:25 +0000
commit4f8f2f7617d071ba89e07fde5ff19a604c6d3f3a (patch)
tree1b094aa3273abc829435f2f6a7c4089e8476d961 /gcc/testsuite/gcc.dg/tree-ssa
parent6c711ccf41b5e712ebfad40c83278bf33775bd9b (diff)
downloadgcc-4f8f2f7617d071ba89e07fde5ff19a604c6d3f3a.tar.gz
2008-04-23 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27799 PR tree-optimization/32921 PR tree-optimization/32624 * tree-ssa-structalias.c (merge_smts_into): Only merge the SMTs aliases and the tag itself into the solution. * tree-ssa-alias.c (compute_flow_sensitive_aliasing): Do not merge the points-to solution back into the SMT aliases. (may_alias_p): Use alias_set_subset_of instead of aliases_conflict_p. A pointer which points to memory with alias set zero may access any variable. * gcc.dg/tree-ssa/pr27799.c: New testcase. * gcc.dg/tree-ssa/20030807-7.c: Remove xfail, scan vrp dump. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134598 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr27799.c26
2 files changed, 30 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c b/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c
index 253c27ac4f7..f9f5fb798ef 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030807-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom3" } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
extern void abort (void);
@@ -32,7 +32,6 @@ simplify_condition (cond_p)
c_simplify_stmt (&decl);
}
-/* There should be exactly one IF conditional. TBAA is not able to
- determine that 'decl' and 'cond' can't alias. */
-/* { dg-final { scan-tree-dump-times "if " 1 "dom3" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "dom3" } } */
+/* There should be exactly one IF conditional. */
+/* { dg-final { scan-tree-dump-times "if " 1 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr27799.c b/gcc/testsuite/gcc.dg/tree-ssa/pr27799.c
new file mode 100644
index 00000000000..de09a40e08b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr27799.c
@@ -0,0 +1,26 @@
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+struct X { double m; int x; };
+struct Y { int y; short d; };
+struct YY { int y; short d; char c; };
+
+extern void link_error (void);
+
+int foo(struct X *x, struct Y *y)
+{
+ x->x = 0;
+ y->y = 1;
+ if (x->x != 0)
+ link_error ();
+}
+
+int foo_no(struct X *x, struct YY *y)
+{
+ x->x = 0;
+ y->y = 1;
+ if (x->x != 0)
+ link_error ();
+}
+
+int main() {}