Only xfail gcc.dg/pr84877.c on 32-bit hppa*-*-*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr84877.c
blob68681206e7311deb7c9f64cf20b605415b18bc1a
1 /* { dg-do run { xfail { cris-*-* sparc*-*-* } || { { ! lp64 } && hppa*-*-* } } } */
2 /* { dg-options "-O2" } */
4 #include <inttypes.h>
6 struct U {
7 int M0;
8 int M1;
9 } __attribute ((aligned (16)));
11 volatile struct U p0 = {1, 0};
13 void __attribute__ ((noinline))
14 foo (struct U p)
17 volatile intptr_t mask = 0b1111;
18 volatile int dummy[2];
19 struct U p1 = p;
20 dummy[1] = p.M0;
22 if ((intptr_t)(&p1) & mask)
23 __builtin_abort ();
24 if ((intptr_t)(&p) & mask)
25 __builtin_abort ();
27 if (p1.M0 != dummy[1])
28 __builtin_abort ();
29 if (p1.M1 != p.M1)
30 __builtin_abort ();
33 int
34 main ()
36 foo (p0);
37 return 0;