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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [fntry1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/26433
2
// { dg-do link }
3
 
4
int get_int()
5
{
6
  throw 1;
7
 
8
  return 0;
9
}
10
 
11
template  class Test
12
{
13
public:
14
  Test()
15
        try
16
        : i(get_int())
17
  {
18
    i++;
19
  }
20
  catch(...)
21
  {
22
    // Syntax error caused by undefined __FUNCTION__.
23
    const char* ptr = __FUNCTION__;
24
  }
25
 
26
private:
27
  int i;
28
  _T t;
29
};
30
 
31
int main()
32
{
33
    try
34
      {
35
        Test test;
36
      }
37
    catch(...)
38
      {
39
        return 1;
40
      }
41
 
42
    return 0;
43
}

powered by: WebSVN 2.1.0

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