https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109571

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You get the same warning with:

struct A
{
  int i = 0;
};

struct B: A
{
  virtual ~B ();
};

int f(B *tmp)
{
   A *a = tmp;
  return a->i;
}

Reply via email to