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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ipa/] [pr46053.C] - Blame information for rev 700

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O -fipa-cp -fno-early-inlining"  } */
3
 
4
extern "C" void abort ();
5
 
6
struct A
7
{
8
  virtual void foo () = 0;
9
};
10
 
11
struct B : A
12
{
13
  virtual void foo () = 0;
14
};
15
 
16
struct C : A
17
{
18
};
19
 
20
struct D : C, B
21
{
22
  int i;
23
  D () : i(0xaaaa) {}
24
  virtual void foo ()
25
  {
26
    if (i != 0xaaaa)
27
      abort();
28
  }
29
};
30
 
31
static inline void bar (B &b)
32
{
33
  b.foo ();
34
}
35
 
36
int main()
37
{
38
  D d;
39
  bar (d);
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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