(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
init/
ref19.C
// PR c++/49528
// { dg-do run }

int d;

struct A
{
  int i;
  ~A() { ++d; };
};

int main()
{
  {
    const int &r = A().i;
    if (d != 0)
      return 1;
  }
  if (d != 1)
    return 1;
}