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.
From-SVN: r85087
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.
+
* gcc.dg/vmx/debug-1.c: Use int, not long, in union with vector.
* gcc.dg/vmx/varargs-1.c: Use int, not long, in union with vector.
--- /dev/null
+/* { 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);
+}
}
n_a;
-typedef struct n_a_x
-{
- n_a b;
- char a;
-}
-n_a_x;
-
static n_a gn_a;
static int
"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)");