1/* { dg-do compile } */
2/* { dg-options "-O2 -fdump-ipa-whole-program"  } */
3double foo ();
4struct B
5{
6  bool b1 () { return b3 (); }
7  void b2 ();
8  virtual bool b3 ();
9};
10struct C
11{
12  C () {}
13  bool
14  c1 (float x, float y)
15  {
16    if (x != c3 || y != c4)
17      c2.b2 ();
18    return c2.b1 ();
19  }
20  B c2;
21  float c3, c4;
22};
23
24void
25bar ()
26{
27  static C c;
28  c.c1 (60, (int) foo ());
29}
30/* We optimize out this call just after early passes.  Unfortunately
31   this unreachable removal is not logged in dump file.  */
32/* { dg-final { scan-ipa-dump-not "OBJ_TYPE_REF" "whole-program" } } */
33/* { dg-final { cleanup-ipa-dump "whole-program" } } */
34