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