aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/ubsan/null-7.c
blob: bf30a0b9b399a0c1515eff1d66a770c63be41ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do run } */
/* { dg-options "-fsanitize=null -w" } */
/* { dg-shouldfail "ubsan" } */

int *
gao (void)
{
  return 0;
}

int
main (void)
{
  return *gao ();
}

/* { dg-output "load of null pointer of type 'int'(\n|\r\n|\r)" } */