PR libstdc++/54924 - Warn for std::string constructor with wrong size
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / devirt-50.C
blob32071cfba06ae3ea8cd908b26cdac314982439c4
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-tree-optimized"  } */
3 struct B {
4         B* self;
5         B() : self( this ) { self->f(); }
6         virtual void f() = 0;
7     };
9     struct D : B
10     {
11         void f() {}
12     };
14     int main()
15     {
16         D d;
17     }
19 /* { dg-final { scan-tree-dump "cxa_pure_virtual" "optimized"} } */