OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [eh/] [builtin2.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// 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" } } */

powered by: WebSVN 2.1.0

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