view gcc/testsuite/g++.dg/ipa/pr63470.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 ipa/63470.C */
/* { dg-do compile } */
/* { dg-options "-O2 -finline-functions -Wno-return-type" } */

class A
{
public:
  virtual bool m_fn1 ();
  virtual const char **m_fn2 (int);
  virtual int m_fn3 ();
};
class FTjackSupport : A
{
  ~FTjackSupport ();
  bool m_fn1 ();
  bool m_fn4 ();
  const char **
  m_fn2 (int)
  {
    return 0;
  }
  int _inited;
  int *_jackClient;
  int _activePathCount;
}

* a;
void fn1 (...);
void fn2 (void *);
int fn3 (int *);
FTjackSupport::~FTjackSupport () { m_fn4 (); }

bool
FTjackSupport::m_fn1 ()
{
  if (!_jackClient)
    return 0;
  for (int i=0; _activePathCount; ++i)
    if (m_fn2 (i))
      fn2 (a);
  if (m_fn3 ())
    fn2 (a);
  if (fn3 (_jackClient))
    fn1 (0);
}

bool
FTjackSupport::m_fn4 ()
{
  if (_inited && _jackClient)
    {
      m_fn1 ();
      return 0;
    }
}