aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-02-04 11:15:39 +0000
committerRichard Henderson <rth@redhat.com>2004-02-04 11:15:39 +0000
commitc0c8e7a43421f5c76308066c90bddd22f419882c (patch)
tree6cc876802ccf63a01066e535e0d76eb9391ab3c7 /gcc/testsuite/gcc.dg
parentfe0b0eac40858eb41293301f349cf3e5605a0104 (diff)
* gcc.dg/tree-ssa/20040204-1.c: Rename from ssa-ccp-5.c.
Look at .optimized output. XFAIL. * gcc.dg/tree-ssa/ssa-ccp-11.c: XFAIL. * gcc.dg/tree-ssa/ssa-ccp-3.c: XFAIL. * gcc.dg/tree-ssa/ssa-ccp-4.c: Remove. * gcc.dg/tree-ssa/ssa-ccp-6.c: Remove. * gcc.dg/tree-ssa/ssa-ccp-8.c: Remove. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@77235 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c (renamed from gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-5.c)9
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-4.c46
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-6.c61
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-8.c97
6 files changed, 10 insertions, 210 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-5.c b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
index e34088120bc..426e2eab51a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-ccp" } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
extern void link_error (void);
@@ -29,5 +29,8 @@ void test55 (int x, int y)
/* There should be not link_error calls, if there is any the
optimization has failed */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp"} } */
-
+/* ??? Ug. This one may or may not fail based on how fold decides
+ that the && should be emitted (based on BRANCH_COST). Fix this
+ by teaching dom to look through && and register all components
+ as true. */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-11.c
index 185cedd99e4..b7f307964a6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-11.c
@@ -38,4 +38,4 @@ int test1111 (int param)
}
/* All ifs should be eliminated. */
-/* { dg-final { scan-tree-dump-times "if" 0 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "if" 0 "optimized" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-3.c
index e255c7fb20d..15d43cb7ef7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-3.c
@@ -129,5 +129,6 @@ int* test666 (int * __restrict__ rp1, int * __restrict__ rp2, int *p1)
/* There should be not link_error calls, if there is any the
optimization has failed */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp"} } */
-
+/* ??? While we indeed don't handle some of these, a couple of the
+ restrict tests are incorrect. */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-4.c
deleted file mode 100644
index a96f42ca71e..00000000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-4.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-ccp" } */
-
-extern void link_error (void);
-
-/* some array tests -- more to come */
-
-
-void test14 (int *intarr)
-{
- intarr[0] = 0;
- if (intarr[0] != 0)
- link_error ();
-}
-
-
-void test15 (int *intarr)
-{
- intarr[0] = 0;
- intarr[1] = 1;
- if (intarr[0] != 0)
- link_error ();
- if (intarr[1] != 1)
- link_error ();
-}
-
-
-void test16 (int *intarr, short *shortarr)
-{
- intarr[0] = 1;
- shortarr[0] = 1;
- intarr[0] += 1;
- shortarr[0] += 1;
-
- if (intarr[0] != 2)
- link_error ();
-
- if (shortarr[0] != 2)
- link_error ();
-}
-
-
-/* There should be not link_error calls, if there is any the
- optimization has failed */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp"} } */
-
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-6.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-6.c
deleted file mode 100644
index 1122e6b00e1..00000000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-6.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O1 -fno-tree-dominator-opts -fdump-tree-ccp" } */
-
-extern void link_error (void);
-
-/* tests to check if some identities can be proven by the compiler */
-
-
-void test6 (unsigned int a)
-{
- if (a != a)
- link_error ();
-}
-
-void test66 (unsigned int a)
-{
- unsigned int b = a;
- if (b != a)
- link_error ();
-}
-
-void test666 (unsigned int a)
-{
- unsigned int b = a - 32;
- if (b != (a - 32))
- link_error ();
-}
-
-void test6666 (unsigned int a)
-{
- if (a-32 != a-32)
- link_error ();
-}
-
-
-
-/*
- This should be moved to a place that scans the copyprop dump
-*/
-
-void test66666 (int a)
-{
- int b = a;
- if (a > 25)
- {
- int c = b;
- if (c < 30)
- {
- int d = c;
- if (d != a)
- link_error ();
-
- }
- }
-}
-
-
-/* There should be not link_error calls, if there is any the
- optimization has failed */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp"} } */
-
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-8.c
deleted file mode 100644
index ae6436cccb5..00000000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-8.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-ccp" } */
-
-/* structures -- more tests to come */
-
-
-struct foo {
- int a;
- int b;
- int c[10];
- short d;
-};
-
-extern void link_error (void);
-
-void
-test8 (struct foo *f)
-{
- f->a = 0;
- f->b = 0;
- if (f->a != 0)
- link_error ();
-}
-
-void
-test88 (struct foo f)
-{
- f.a = 0;
- f.b = 0;
- if (f.a != 0)
- link_error ();
-}
-
-void
-test888 (struct foo *f)
-{
- f->c[0] = 0;
- f->c[1] = 0;
- if (f->c[0] != 0)
- link_error ();
-}
-
-
-void
-test8888 (struct foo f)
-{
- f.a = 0;
- f.d = 0;
- if (f.a != 0)
- link_error ();
-}
-
-void
-test88888 (struct foo *f)
-{
- f->a = 0;
- f->d = 0;
- if (f->a != 0)
- link_error ();
-}
-
-void
-test888888 (struct foo *f)
-{
- short k;
- f->a = 0;
- k = 6;
- if (f->a != 0)
- link_error ();
-}
-
-
-void
-test8888888 (struct foo f)
-{
- short k;
- f.a = 0;
- k = 6;
- if (f.a != 0)
- link_error ();
-}
-
-void
-test88888888 (int *arr)
-{
- short k;
- arr[0] = 0;
- k = 6;
- if (arr[0] != 0)
- link_error ();
-}
-
-
-/* There should be no link_error calls, if there is any, the
- optimization has failed */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "ccp"} } */
-