view gcc/testsuite/g++.dg/tree-ssa/fwprop-align.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

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-forwprop2" } */

struct A
{
  void foo ()
  {
  }
};

int main()
{
  void (A::* const p)() = & A::foo;
  A a;
  (a.*p)();
}

/* We should eliminate the check if p points to a virtual function. */
/* { dg-final { scan-tree-dump-times "& 1" 0 "forwprop2" } } */