blob: 6c19a4339a5c68078b95dca57e7c350b72c54826 [file] [log] [blame]
// PR c++/69922
// { dg-do compile }
// { dg-options "-Wnonnull-compare" }
struct S { virtual ~S (); };
struct T { virtual ~T (); };
bool b, c;
S *p;
T *q, *r;
S::~S ()
{
delete (b ? this : p); // { dg-bogus "nonnull argument" }
}
T::~T ()
{
delete (b ? (c ? this : q) : r); // { dg-bogus "nonnull argument" }
}