1 /* PR c++/79984 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wnonnull-compare" } */
4
5 enum { r = 1 };
6
7 __attribute__ ((nonnull (r))) int
f(int * p)8 f (int *p)
9 {
10 return p == 0; /* { dg-warning "'nonnull' argument 'p' compared to NULL" } */
11 }
12