aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/data-model-path-1.c
blob: d7058ea18e034a181bf7fac686956703ac9394a9 (plain)
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'" } */
}