OSDN Git Service

PR c/15052
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ppc-ldstruct.c
1 /* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */
2 /* { dg-options "-O -mlong-double-128" } */
3
4 /* SVR4 and EABI both specify that 'long double' is aligned to a 128-bit
5    boundary in structures.  */
6
7 struct {
8   int x;
9   long double d;
10 } s;
11
12 int main(void)
13 {
14   if (sizeof (s) != 32)
15     abort ();
16   if ((char *)&s.d - (char *)&s != 16)
17     abort ();
18   exit (0);
19 }