comparison gcc/testsuite/g++.dg/eh/spbp.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do run } */
2 /* { dg-options "-gdwarf-2" } */
3 /* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } } */
4
5 /* This was a bug on x86-darwin, where the register numbering for SP
6 and BP was swapped (it's easy to do because on that port it's
7 different for eh_frame and debug_frame). */
8
9 #include <stdlib.h>
10
11 void f1(int t)
12 {
13 char u[t];
14 throw 1;
15 }
16
17 int main()
18 {
19 bool b = true;
20 try {
21 f1(100);
22 } catch (int x) {
23 if (b)
24 exit (0);
25 }
26 abort ();
27 }