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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [thunk3.C] - Blame information for rev 764

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/39106
2
// { dg-do compile }
3
// { dg-options "-O2" }
4
 
5
extern "C" void abort ();
6
 
7
struct A
8
{
9
  A (bool x = true);
10
};
11
class B
12
{
13
  virtual bool bar (A &, int) const =0;
14
};
15
class C : virtual public B
16
{
17
};
18
struct D : virtual public B
19
{
20
  bool bar (A &, int) const;
21
};
22
template 
23
struct E : public D
24
{
25
  bool bar (A &x, int y) const
26
  {
27
    return baz().bar (x, y);
28
  }
29
  const D & baz () const;
30
};
31
extern template class E<0>;
32
 
33
void
34
foo ()
35
{
36
  try
37
  {
38
    A a;
39
    abort ();
40
  } catch (...)
41
  {
42
  }
43
  A b;
44
  E<0> c;
45
  c.bar (b, 3);
46
  E<0> d;
47
  d.bar (b, 3);
48
}

powered by: WebSVN 2.1.0

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