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