OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [eh/] [builtin1.C] - Blame information for rev 308

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// 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
struct A { A (); ~A (); int i; };
10
 
11
int
12
foo ()
13
{
14
  A a;
15
  printf ("foo %d\n", a.i);
16
}
17
 
18
int
19
bar ()
20
{
21
  A a;
22
  __builtin_printf ("foo %d\n", a.i);
23
}
24
 
25
/* { dg-final { scan-tree-dump-times "resx" 2 "eh" } } */
26
/* { dg-final { cleanup-tree-dump "eh" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.