gcc/testsuite/g++.dg/torture/pr65600.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-std=c++11" } |
| 3 | class A { |
| 4 | public: |
| 5 | virtual void m_fn1() {} |
| 6 | int weak_release___trans_tmp_1; |
| 7 | void m_fn2() { |
| 8 | __asm__("\n\n\n\n"); |
| 9 | if (weak_release___trans_tmp_1) |
| 10 | m_fn1(); |
| 11 | } |
| 12 | }; |
| 13 | class weak_count { |
| 14 | A *pi_; |
| 15 | |
| 16 | public: |
| 17 | weak_count() : pi_() {} |
| 18 | ~weak_count() { |
| 19 | if (pi_) |
| 20 | pi_->m_fn2(); |
| 21 | } |
| 22 | }; |
| 23 | class B { |
| 24 | weak_count pn; |
| 25 | }; |
| 26 | int |
| 27 | main() { B a; } |
| 28 |