view gcc/testsuite/g++.dg/debug/pr47106.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
line wrap: on
line source

// { dg-do compile }
// { dg-options "-O -fpartial-inlining -flto -fconserve-stack -fcompare-debug" }
// { dg-require-effective-target lto }
// { dg-xfail-if "" { powerpc-ibm-aix* } }

void end (int, int) __attribute__ ((__noreturn__));

struct S
{
  int i;
  S *s;
};

inline bool f (S *s)
{
  if (!s->s)
    end (0, 0);
  return s->s == s;
}

inline bool
baz (S s1, S)
{
  while (f (&s1));
}

inline bool
bar (S s1, S s2, S)
{
  baz (s1, s2);
}

S getS ();

bool
foo ()
{
  bar (getS (), getS (), getS ());
}