2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr36185.C
blob2ffa52f8e864435629608add4e8cb87028599889
1 // PR rtl-optimization/36185
2 // { dg-do run }
3 // { dg-options "-O2 -fgcse-sm" }
5 struct Base {
6         virtual ~Base() {}
7         virtual void f() = 0;
8 };
9 struct Derived : Base {
10         Derived();
11         virtual void f() {}
13 struct Foo {
14         Foo(Base&);
16 Derived::Derived() {
17         Foo foo(*this);
19 Foo::Foo(Base& base) {
20         base.f();
22 int main() {
23         Derived d;