annotate gcc/testsuite/g++.dg/eh/builtin1.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 // Verify that if explicit prototype for builtin is present without throw(),
kono
parents:
diff changeset
2 // both the normal builtin and __builtin_* variant are expected to be
kono
parents:
diff changeset
3 // able to throw exceptions.
kono
parents:
diff changeset
4 // { dg-do compile }
kono
parents:
diff changeset
5 // { dg-options "-fdump-tree-eh" }
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 extern "C" int printf (const char *, ...);
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 extern void callme (void) throw();
kono
parents:
diff changeset
10
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
11 void
111
kono
parents:
diff changeset
12 foo (int i)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 try {
kono
parents:
diff changeset
15 printf ("foo %d\n", i);
kono
parents:
diff changeset
16 } catch (...) {
kono
parents:
diff changeset
17 callme();
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19 }
kono
parents:
diff changeset
20
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
21 void
111
kono
parents:
diff changeset
22 bar (int i)
kono
parents:
diff changeset
23 {
kono
parents:
diff changeset
24 try {
kono
parents:
diff changeset
25 __builtin_printf ("foo %d\n", i);
kono
parents:
diff changeset
26 } catch (...) {
kono
parents:
diff changeset
27 callme();
kono
parents:
diff changeset
28 }
kono
parents:
diff changeset
29 }
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 /* { dg-final { scan-tree-dump-times "resx" 2 "eh" } } */