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