[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / eh / spbp.C
blob6f228f28c490f0b1d841313eb492959aee5fdde4
1 /* { dg-do run } */
2 /* { dg-options "-gdwarf-2" } */
3 /* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } } */
4 /* { dg-require-effective-target alloca } */
6 /* This was a bug on x86-darwin, where the register numbering for SP
7    and BP was swapped (it's easy to do because on that port it's
8    different for eh_frame and debug_frame).  */
10 #include <stdlib.h>
12 void f1(int t)
14   char u[t];
15   throw 1;
18 int main()
20   bool b = true;
21   try {
22     f1(100);
23   } catch (int x) {
24     if (b)
25       exit (0);
26   }
27   abort ();