view gcc/testsuite/g++.dg/debug/pr44182.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR tree-optimization/44182
// { dg-do compile }
// { dg-options "-fcompare-debug" }

struct S
{
  int i;
  S ();
  ~S ();
  void f1 ();
  void f2 (S s)
  {
    f3 (s.i);
    for (int j = 0; j < s.i; j++) f1 ();
  }
  void f3 (int j)
  {
    if (j > i) f1 ();
  }
};

void
f (S *x)
{
  x->f2 (S ());
}