diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ppc-ldstruct.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ppc-ldstruct.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ppc-ldstruct.c b/gcc/testsuite/gcc.dg/ppc-ldstruct.c new file mode 100644 index 0000000..e3912d5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ppc-ldstruct.c @@ -0,0 +1,19 @@ +/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */ +/* { dg-options "-O -mlong-double-128" } */ + +/* SVR4 and EABI both specify that 'long double' is aligned to a 128-bit + boundary in structures. */ + +struct { + int x; + long double d; +} s; + +int main(void) +{ + if (sizeof (s) != 32) + abort (); + if ((char *)&s.d - (char *)&s != 16) + abort (); + exit (0); +} |