aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-12.C
blob: 16bae4d8d7b0cf943299889df41cf979876feebe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do compile { target c++11 } }
// { dg-options "-O -fdump-ipa-inline" }

class Foo
{
public:
  void Bar() const
    {
      __builtin_puts ("Howdy!");
    }
};

int main()
{
  Foo x;
  auto y = &Foo::Bar;
  (x.*y)();
  return 0;
}

// { dg-final { scan-ipa-dump "Inlined 1 calls, eliminated 1 functions" "inline" } }
// { dg-final { cleanup-ipa-dump "inline" } }