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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Test whether exception specifier dependent on template parameter
2
// is accepted during template decl processing.
3
// { dg-do run }
4
 
5
extern "C" void abort();
6
 
7
class A {};
8
 
9
template 
10
struct B
11
{
12
  typedef A E;
13
};
14
 
15
template 
16
struct C
17
{
18
  typedef B D;
19
  typedef typename D::E E;
20
  void f() throw(E) { throw E(); }
21
};
22
 
23
int main()
24
{
25
  int caught = 0;
26
  try
27
    {
28
      C x;
29
      x.f();
30
    }
31
  catch (A)
32
    {
33
      ++caught;
34
    }
35
  if (caught != 1)
36
    abort ();
37
  return 0;
38
}

powered by: WebSVN 2.1.0

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