Skip guality tests on hppa-hpux.
[official-gcc.git] / gcc / testsuite / g++.dg / guality / pr82630.C
blob71d11acf5e2403661b259f32e21af7704e2cd5e8
1 // PR debug/82630
2 // { dg-do run }
3 // { dg-additional-options "-fPIC" { target fpic } }
5 struct C
7   int &c;
8   long d;
9   __attribute__((always_inline)) C (int &x) : c(x), d() {}
11 int v;
13 __attribute__((noipa)) void
14 fn1 (const void *x)
16   asm volatile ("" : : "g" (x) : "memory");
19 __attribute__((noipa)) void
20 fn2 (C x)
22   int a = x.c + x.d;
23   asm volatile ("" : : "g" (a) : "memory");
26 __attribute__((noipa)) void
27 fn3 (void)
29   asm volatile ("" : : : "memory");
32 __attribute__((noipa))
33 #ifdef __i386__
34 __attribute__((regparm (2)))
35 #endif
36 static void
37 fn4 (int *x, const char *y, C z)
39   fn2 (C (*x));
40   fn1 ("baz");
41   fn2 (z);      // { dg-final { gdb-test 41 "y\[0\]" "'f'" } }
42   fn1 ("baz");  // { dg-final { gdb-test 41 "y\[1\]" "'o'" } }
45 __attribute__((noipa)) void
46 fn5 (int *x)
48   fn4 (x, "foo", C (*x));
49   fn3 ();
52 int
53 main ()
55   int a = 10;
56   fn5 (&a);
57   return 0;