gcc/testsuite/g++.dg/pr102988.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -fharden-conditional-branches -fchecking=1" } */ |
| 3 | |
| 4 | /* DECL_BY_REFERENCE RESULT_DECL is read-only, we can't create a copy |
| 5 | of its (address) default def and set it. */ |
| 6 | |
| 7 | void ll(); |
| 8 | struct k { |
| 9 | ~k(); |
| 10 | }; |
| 11 | k ice(k *a) |
| 12 | { |
| 13 | k v; |
| 14 | if (&v!= a) |
| 15 | ll(); |
| 16 | return v; |
| 17 | } |