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

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

/* { dg-do compile } */
/* { dg-options "-O1 -fnon-call-exceptions" }  */

static inline const int &
max (const int &a, const int &b)
{
  return a ? a : b;
}

static inline int
baz ()
{
  return max (0, 0);
}

struct S
{
  ~S ()
  {
    baz ();
  }
};

void bar ();
void
foo ()
{
  S s;
  bar ();
}