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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [covariant1.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR c++/20206
2
// { dg-do run }
3
// { dg-options "-O0" }
4
 
5
void
6
bar (int x)
7
{
8
  asm ("" : : "g" (x));
9
}
10
 
11
struct S { S () {}; virtual ~S () {}; };
12
struct T { virtual T *foo (int) {}; };
13
struct V : virtual S, virtual T {};
14
struct V v;
15
struct U : public S, public T
16
{
17
  bool a;
18
  U () {}
19
  virtual ~U () {}
20
  virtual V *foo (int x)
21
  {
22
    switch (x)
23
      {
24
      case 12:
25
        break;
26
      case 9:
27
        bar (7);
28
        break;
29
      case 10:
30
        bar (12);
31
        break;
32
      case 4:
33
        bar (18);
34
        break;
35
      case 2:
36
        bar (26);
37
        break;
38
      }
39
    return &v;
40
  }
41
};
42
U u;
43
 
44
int
45
main ()
46
{
47
}

powered by: WebSVN 2.1.0

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