PR c++/80290
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr59622-4.C
blobf72af1641c86764705ff66fdb1a653cf85288567
1 // PR tree-optimization/59622
2 // { dg-do compile }
3 // { dg-options "-O2" }
5 struct C { int a; int b; };
7 namespace
9   struct A
10   {
11     A () {}
12     virtual C bar (int) = 0;
13     C baz (int x) { return bar (x); }
14   };
17 A *a;
20 foo ()
22   return a->baz (0);