repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wnonnull-compare-7.C
blob
6c19a4339a5c68078b95dca57e7c350b72c54826
1
// PR c++/69922
2
// { dg-do compile }
3
// { dg-options "-Wnonnull-compare" }
4
5
struct S { virtual ~S (); };
6
struct T { virtual ~T (); };
7
bool b, c;
8
S *p;
9
T *q, *r;
10
11
S::~S ()
12
{
13
delete (b ? this : p); // { dg-bogus "nonnull argument" }
14
}
15
16
T::~T ()
17
{
18
delete (b ? (c ? this : q) : r); // { dg-bogus "nonnull argument" }
19
}