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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [builtin1.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 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
extern void callme (void) throw();
10
 
11
int
12
foo (int i)
13
{
14
  try {
15
    printf ("foo %d\n", i);
16
  } catch (...) {
17
    callme();
18
  }
19
}
20
 
21
int
22
bar (int i)
23
{
24
  try {
25
    __builtin_printf ("foo %d\n", i);
26
  } catch (...) {
27
    callme();
28
  }
29
}
30
 
31
/* { dg-final { scan-tree-dump-times "resx" 2 "eh" } } */
32
/* { 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.