annotate gcc/testsuite/g++.dg/eh/spbp.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do run } */
kono
parents:
diff changeset
2 /* { dg-options "-gdwarf-2" } */
kono
parents:
diff changeset
3 /* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
4 /* { dg-require-effective-target alloca } */
111
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 /* This was a bug on x86-darwin, where the register numbering for SP
kono
parents:
diff changeset
7 and BP was swapped (it's easy to do because on that port it's
kono
parents:
diff changeset
8 different for eh_frame and debug_frame). */
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 #include <stdlib.h>
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 void f1(int t)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 char u[t];
kono
parents:
diff changeset
15 throw 1;
kono
parents:
diff changeset
16 }
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 int main()
kono
parents:
diff changeset
19 {
kono
parents:
diff changeset
20 bool b = true;
kono
parents:
diff changeset
21 try {
kono
parents:
diff changeset
22 f1(100);
kono
parents:
diff changeset
23 } catch (int x) {
kono
parents:
diff changeset
24 if (b)
kono
parents:
diff changeset
25 exit (0);
kono
parents:
diff changeset
26 }
kono
parents:
diff changeset
27 abort ();
kono
parents:
diff changeset
28 }