view gcc/testsuite/g++.dg/debug/dwarf2/icf.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

// { dg-do compile }
// { dg-options "-O1 -gdwarf-2 -gno-strict-dwarf -fno-inline -dA" }

class A
{
 public:
  A();
  virtual void work();
  virtual int p();
 private:
  int i;
};

class B
{
 public:
  B();
  ~B();
  void work(const A* a);
 private:
  int j;
};

void
test1(A* a)
{
  a->work();
}

void
test2(A* a)
{
  if (a->p())
    {
      B b;
      b.work(a);
    }
}