view gcc/testsuite/g++.dg/torture/pr43801.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR tree-optimization/43801
// { dg-do compile }
// { dg-options "-fipa-cp -fipa-cp-clone" }

struct A
{
  virtual void f (int);
};
struct B : virtual A
{
  virtual void f (int i) { if (i) A::f(0); }
};
struct C : virtual B
{
  virtual void f (int) { B::f(0); }
};

void
foo ()
{
  C ();
}