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

Subversion Repositories openrisc

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

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