gcc/testsuite/g++.dg/cpp0x/defaulted61.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | // { dg-final { scan-assembler "_ZN3OneD0Ev" } } |
| 3 | |
| 4 | // PR C++/88114 |
| 5 | // Destructor of an abstract class was never generated |
| 6 | // when compiling the class - nor later due to the |
| 7 | // '#pragma interface' |
| 8 | |
| 9 | #pragma implementation |
| 10 | #pragma interface |
| 11 | |
| 12 | class One |
| 13 | { |
| 14 | public: |
| 15 | virtual ~One() = default; |
| 16 | void some_fn(); |
| 17 | virtual void later() = 0; |
| 18 | private: |
| 19 | int m_int; |
| 20 | }; |
| 21 | |
| 22 | void One::some_fn() { } |