URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr36185.C] - Rev 693
Compare with Previous | Blame | View Log
// PR rtl-optimization/36185
// { dg-do run }
// { dg-options "-O2 -fgcse-sm" }
struct Base {
virtual ~Base() {}
virtual void f() = 0;
};
struct Derived : Base {
Derived();
virtual void f() {}
};
struct Foo {
Foo(Base&);
};
Derived::Derived() {
Foo foo(*this);
}
Foo::Foo(Base& base) {
base.f();
}
int main() {
Derived d;
}