aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/simd-4.x4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040308-1.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040309-1.c24
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040311-1.c68
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040313-1.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/simd-1.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/simd-2.x7
7 files changed, 18 insertions, 130 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-4.x b/gcc/testsuite/gcc.c-torture/compile/simd-4.x
new file mode 100644
index 00000000000..6bb99bad79f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/simd-4.x
@@ -0,0 +1,4 @@
+# APPLE LOCAL vector instructions are not supported except with -faltivec
+
+if { [istarget "*-apple-darwin*"] } { set options "-faltivec" }
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040308-1.c b/gcc/testsuite/gcc.c-torture/execute/20040308-1.c
deleted file mode 100644
index 4c63535e7f7..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040308-1.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This used to fail on SPARC with an unaligned memory access. */
-
-void foo(int n)
-{
- struct S {
- int i[n];
- unsigned int b:1;
- int i2;
- } __attribute__ ((packed)) __attribute__ ((aligned (4)));
-
- struct S s;
-
- s.i2 = 0;
-}
-
-int main(void)
-{
- foo(4);
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040309-1.c b/gcc/testsuite/gcc.c-torture/execute/20040309-1.c
deleted file mode 100644
index 49fa79560c6..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040309-1.c
+++ /dev/null
@@ -1,24 +0,0 @@
-extern void abort ();
-
-int foo(unsigned short x)
-{
- unsigned short y;
- y = x > 32767 ? x - 32768 : 0;
- return y;
-}
-
-int main()
-{
- if (foo (0) != 0)
- abort ();
- if (foo (32767) != 0)
- abort ();
- if (foo (32768) != 0)
- abort ();
- if (foo (32769) != 1)
- abort ();
- if (foo (65535) != 32767)
- abort ();
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040311-1.c b/gcc/testsuite/gcc.c-torture/execute/20040311-1.c
deleted file mode 100644
index 013d869abf4..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040311-1.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (C) 2004 Free Software Foundation.
-
- Check that constant folding and RTL simplification of -(x >> y) doesn't
- break anything and produces the expected results.
-
- Written by Roger Sayle, 11th March 2004. */
-
-extern void abort (void);
-
-#define INT_BITS (sizeof(int)*8)
-
-int test1(int x)
-{
- return -(x >> (INT_BITS-1));
-}
-
-int test2(unsigned int x)
-{
- return -((int)(x >> (INT_BITS-1)));
-}
-
-int test3(int x)
-{
- int y;
- y = INT_BITS-1;
- return -(x >> y);
-}
-
-int test4(unsigned int x)
-{
- int y;
- y = INT_BITS-1;
- return -((int)(x >> y));
-}
-
-int main()
-{
- if (test1(0) != 0)
- abort ();
- if (test1(1) != 0)
- abort ();
- if (test1(-1) != 1)
- abort ();
-
- if (test2(0) != 0)
- abort ();
- if (test2(1) != 0)
- abort ();
- if (test2((unsigned int)-1) != -1)
- abort ();
-
- if (test3(0) != 0)
- abort ();
- if (test3(1) != 0)
- abort ();
- if (test3(-1) != 1)
- abort ();
-
- if (test4(0) != 0)
- abort ();
- if (test4(1) != 0)
- abort ();
- if (test4((unsigned int)-1) != -1)
- abort ();
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040313-1.c b/gcc/testsuite/gcc.c-torture/execute/20040313-1.c
deleted file mode 100644
index c05fe730f0c..00000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040313-1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* PR middle-end/14470 */
-/* Origin: Lodewijk Voge <lvoge@cs.vu.nl> */
-
-extern void abort(void);
-
-int main()
-{
- int t[1025] = { 1024 }, d;
-
- d = 0;
- d = t[d]++;
- if (t[0] != 1025)
- abort();
- if (d != 1024)
- abort();
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-1.x b/gcc/testsuite/gcc.c-torture/execute/simd-1.x
new file mode 100644
index 00000000000..db203f3d590
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-1.x
@@ -0,0 +1,7 @@
+# APPLE LOCAL vector instructions are not supported except with -faltivec. xfailed it.
+
+if { [istarget "*-apple-darwin*"] } {
+ set torture_compile_xfail "*-apple-darwin*"
+}
+
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-2.x b/gcc/testsuite/gcc.c-torture/execute/simd-2.x
new file mode 100644
index 00000000000..db203f3d590
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-2.x
@@ -0,0 +1,7 @@
+# APPLE LOCAL vector instructions are not supported except with -faltivec. xfailed it.
+
+if { [istarget "*-apple-darwin*"] } {
+ set torture_compile_xfail "*-apple-darwin*"
+}
+
+return 0