URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [eh/] [builtin1.C] - Rev 301
Compare with Previous | Blame | View Log
// Verify that if explicit prototype for builtin is present without throw(),
// both the normal builtin and __builtin_* variant are expected to be
// able to throw exceptions.
// { dg-do compile }
// { dg-options "-fdump-tree-eh" }
extern "C" int printf (const char *, ...);
struct A { A (); ~A (); int i; };
int
foo ()
{
A a;
printf ("foo %d\n", a.i);
}
int
bar ()
{
A a;
__builtin_printf ("foo %d\n", a.i);
}
/* { dg-final { scan-tree-dump-times "resx" 2 "eh" } } */
/* { dg-final { cleanup-tree-dump "eh" } } */