From: Janis Johnson Date: Fri, 23 Jul 2004 18:25:47 +0000 (+0000) Subject: varargs-4.c: Remove a Darwin-specific check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9eef87830def2bce1c2f87e62205d2fa70ed2e3;p=gcc.git varargs-4.c: Remove a Darwin-specific check. 2004-07-23 Janis Johnson * gcc.dg/vmx/varargs-4.c: Remove a Darwin-specific check. * gcc.dg/darwin-abi-3.c: New test. From-SVN: r85087 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ffb8606522e..7e6a5ea3d38 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2004-07-23 Janis Johnson + * 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. 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 + +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)");