summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr102988.C
blob: 05a1a8f67ed9b05db75e201548282e5f2a016e00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O -fharden-conditional-branches -fchecking=1" } */

/* DECL_BY_REFERENCE RESULT_DECL is read-only, we can't create a copy
   of its (address) default def and set it.  */

void ll();
struct k {
  ~k();
};
k ice(k *a)
{
  k v;
  if (&v!= a)
    ll();
  return v;
}