summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-23 18:25:47 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-23 18:25:47 +0000
commit65a8962bbd083ff469bdf0983c678f8ff6d8c151 (patch)
tree5adb9c55f58d449bb566ac0941905d839311f366 /gcc/testsuite/gcc.dg/vmx
parent6ffbd8a9cea8ea5d437278b3e7d6683fdb12a4cf (diff)
downloadgcc-65a8962bbd083ff469bdf0983c678f8ff6d8c151.tar.gz
2004-07-23 Janis Johnson <janis187@us.ibm.com>
* gcc.dg/vmx/varargs-4.c: Remove a Darwin-specific check. * gcc.dg/darwin-abi-3.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85087 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/vmx')
-rw-r--r--gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c34
-rw-r--r--gcc/testsuite/gcc.dg/vmx/varargs-4.c8
2 files changed, 34 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c b/gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c
new file mode 100644
index 00000000000..af4d15a0c2d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/darwin-abi-3.c
@@ -0,0 +1,34 @@
+/* { dg-do run { target powerpc*-*-darwin* } } */
+
+/* This check was originally in test vmx/varargs-4.c. It does not
+ match the expected behavior according to the PowerPC-64 ELF ABI. */
+
+#include <altivec.h>
+
+extern void abort (void);
+extern void exit (int);
+
+typedef struct n_a
+{
+ signed char m1;
+ short m2;
+ int m3;
+ double m4;
+ vector float m5;
+}
+n_a;
+
+typedef struct n_a_x
+{
+ n_a b;
+ char a;
+}
+n_a_x;
+
+int
+main ()
+{
+ if (sizeof (n_a_x) - sizeof (n_a) != sizeof (n_a))
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/varargs-4.c b/gcc/testsuite/gcc.dg/vmx/varargs-4.c
index 5433329e526..a1755195321 100644
--- a/gcc/testsuite/gcc.dg/vmx/varargs-4.c
+++ b/gcc/testsuite/gcc.dg/vmx/varargs-4.c
@@ -13,13 +13,6 @@ typedef struct n_a
}
n_a;
-typedef struct n_a_x
-{
- n_a b;
- char a;
-}
-n_a_x;
-
static n_a gn_a;
static int
@@ -103,7 +96,6 @@ initn_a(signed char p1, short p2, int p3, double p4, vector float p5)
"i.m5");
check(sizeof(n_a) == 32, "sizeof(n_a)");
- check(sizeof(n_a_x) - sizeof(n_a) == 32, "align(n_a_x)");
check(offsetof(n_a, m1) == 0, "offsetof(m1)");
check(offsetof(n_a, m2) == 2, "offsetof(m2)");