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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr36960.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
 
3
struct Lower {
4
    const int& ref;
5
    Lower(const int& ref) : ref(ref) { }
6
};
7
struct Middle : public virtual Lower {
8
    Middle(const int& ref) : Lower(ref) { }
9
};
10
struct Upper : public Middle {
11
    Upper(const int& ref) : Lower(ref), Middle(ref) { }
12
    int get() { return ref; }
13
};
14
extern "C" void abort (void);
15
int main()
16
{
17
  int i = 0;
18
  Upper upper(i);
19
  if (upper.get() != 0)
20
    abort ();
21
  return 0;
22
}

powered by: WebSVN 2.1.0

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