1 // PR c++/69850
2 // { dg-do compile }
3 // { dg-options "-Wnonnull-compare" }
4 
5 struct A { virtual ~A (); int foo (); };
~BB6 struct B { virtual ~B () { } };
7 struct C : B, A { };
8 
9 int
foo()10 A::foo ()
11 {
12   C *c = dynamic_cast<C *> (this);	// { dg-bogus "nonnull argument" }
13   return !c;
14 }
15