comparison gcc/testsuite/g++.target/aarch64/pr94514.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* PR target/94514. Unwind across mixed pac-ret and non-pac-ret frames. */
2 /* { dg-do run } */
3 /* { dg-require-effective-target lp64 } */
4
5 __attribute__((noinline, target("branch-protection=pac-ret")))
6 static void do_throw (void)
7 {
8 throw 42;
9 __builtin_abort ();
10 }
11
12 __attribute__((noinline, target("branch-protection=none")))
13 static void no_pac_ret (void)
14 {
15 do_throw ();
16 __builtin_abort ();
17 }
18
19 int main ()
20 {
21 try {
22 no_pac_ret ();
23 } catch (...) {
24 return 0;
25 }
26 __builtin_abort ();
27 }