gcc/testsuite/g++.old-deja/g++.eh/crash2.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "-O" } |
| 3 | // Origin: Thomas Kunert <[email protected]> |
| 4 | |
| 5 | struct C { |
| 6 | ~C(); |
| 7 | }; |
| 8 | |
| 9 | struct R { |
| 10 | bool empty() const; |
| 11 | C m_; |
| 12 | }; |
| 13 | |
| 14 | struct R1 { |
| 15 | R1( const R& a ); |
| 16 | ~R1 (); |
| 17 | C m_; |
| 18 | }; |
| 19 | |
| 20 | R1 get_empty(); |
| 21 | |
| 22 | R1::R1( const R& a ) : |
| 23 | m_( a.empty() ? get_empty().m_ : C() ) |
| 24 | {} |
| 25 | |
| 26 | void qnorm( const R & r) |
| 27 | { R1 n( r ); } |