aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/pr45453.C
blob: c8ef8955f0ecbfabef06c47c888ac317082ed32d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized -fno-devirtualize-speculatively" } */
struct S
{
  S();
  virtual inline void foo ()
  {
    foo();
  }
};

void
B ()
{
  S().foo ();
}
/* We should inline foo and devirtualize call to foo in the inlined version.  */
// { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 1 "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }