Rebase.
[official-gcc.git] / gcc / testsuite / g++.dg / torture / stackalign / eh-inline-1.C
blobd2555f2e2c950751e052912df2b01eeb8ba7f24a
1 /* { dg-do run } */
2 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
4 #include "check.h"
6 #ifndef ALIGNMENT
7 #define ALIGNMENT       64
8 #endif
10 typedef int aligned __attribute__((aligned(ALIGNMENT)));
12 int global;
14 class Base {};
16 struct A : virtual public Base
18   A() {}
21 struct B {};
23 static void
24 inline __attribute__((always_inline))
25 foo (void) throw (B,A)
27   aligned i;
29   if (check_int (&i,  __alignof__(i)) != i)
30     abort ();
31   throw A();
34 int
35 main()
37   try { foo (); }
38   catch (A& a) { }
39   return 0;