| 1 |
#include <stddef.h> |
| 2 |
|
| 3 |
static int *__attribute__((noinline)) |
| 4 |
callee (void) |
| 5 |
{ |
| 6 |
return NULL; |
| 7 |
} |
| 8 |
|
| 9 |
void test_1 (void) |
| 10 |
{ |
| 11 |
int *p = callee (); /* { dg-message "return of NULL to 'test_1' from 'callee'" } */ |
| 12 |
*p = 42; /* { dg-warning "dereference of NULL 'p'" } */ |
| 13 |
} |