* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git] / gcc / testsuite / g++.dg / torture / stackalign / eh-global-1.C
blob72dd57ff5c70434eb8d5d6138fbccb948613a659
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)
25 #if __cplusplus <= 201402L
26 throw (B,A)                     // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
27 #endif
29   aligned i;
31   if (check_int (&i,  __alignof__(i)) != i)
32     abort ();
34   throw A();
37 int
38 main()
40   try { foo (); }
41   catch (A& a) { }
42   return 0;