URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// Verify that if explicit prototype for builtin is present with throw(),
|
// Verify that if explicit prototype for builtin is present with throw(),
|
// neither the normal builtin nor __builtin_* variant can throw exceptions.
|
// neither the normal builtin nor __builtin_* variant can throw exceptions.
|
// { dg-do compile }
|
// { dg-do compile }
|
// { dg-options "-fdump-tree-eh" }
|
// { dg-options "-fdump-tree-eh" }
|
|
|
extern "C" int printf (const char *, ...) throw();
|
extern "C" int printf (const char *, ...) throw();
|
|
|
struct A { A (); ~A (); int i; };
|
struct A { A (); ~A (); int i; };
|
|
|
int
|
int
|
foo ()
|
foo ()
|
{
|
{
|
A a;
|
A a;
|
printf ("foo %d\n", a.i);
|
printf ("foo %d\n", a.i);
|
}
|
}
|
|
|
int
|
int
|
bar ()
|
bar ()
|
{
|
{
|
A a;
|
A a;
|
__builtin_printf ("foo %d\n", a.i);
|
__builtin_printf ("foo %d\n", a.i);
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump-times "resx" 0 "eh" } } */
|
/* { dg-final { scan-tree-dump-times "resx" 0 "eh" } } */
|
/* { dg-final { cleanup-tree-dump "eh" } } */
|
/* { dg-final { cleanup-tree-dump "eh" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.