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] - Rev 774

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

// { dg-do run }

struct Lower {
    const int& ref;
    Lower(const int& ref) : ref(ref) { }
};
struct Middle : public virtual Lower {
    Middle(const int& ref) : Lower(ref) { }
};
struct Upper : public Middle {
    Upper(const int& ref) : Lower(ref), Middle(ref) { }
    int get() { return ref; }
};
extern "C" void abort (void);
int main()
{
  int i = 0;
  Upper upper(i);
  if (upper.get() != 0)
    abort ();
  return 0;
}

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

powered by: WebSVN 2.1.0

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