OSDN Git Service

Squash commit of EH in gimple
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / eh / builtin2.C
1 // Verify that if explicit prototype for builtin is present with throw(),
2 // neither the normal builtin nor __builtin_* variant can throw exceptions.
3 // { dg-do compile }
4 // { dg-options "-fdump-tree-eh" }
5
6 extern "C" int printf (const char *, ...) throw();
7
8 struct A { A (); ~A (); int i; };
9
10 int
11 foo ()
12 {
13   A a;
14   printf ("foo %d\n", a.i);
15 }
16
17 int
18 bar ()
19 {
20   A a;
21   __builtin_printf ("foo %d\n", a.i);
22 }
23
24 /* { dg-final { scan-tree-dump-times "resx" 0 "eh" } } */
25 /* { dg-final { cleanup-tree-dump "eh" } } */