Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / torture / stackalign / eh-global-1.C
blobcc05ed04f30a3e1cebc32b8fc927f5697a829843
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 void
24 foo (void) throw (B,A)
26   aligned i;
28   if (check_int (&i,  __alignof__(i)) != i)
29     abort ();
31   throw A();
34 int
35 main()
37   try { foo (); }
38   catch (A& a) { }
39   return 0;