aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/devirt1.C
blob: 2524dd13890b2e8b199727e010421c209bc24a3e (plain)
1
2
3
4
5
6
7
// { dg-do compile }
// { dg-options "-O2 -fdevirtualize" }
// { dg-final { scan-assembler "xyzzy" } }

struct S { S(); virtual void xyzzy(); };
inline void foo(S *s) { s->xyzzy(); }
void bar() { S s; foo(&s); }