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

int
main (void)
{
  unsigned long int *p = 0;
  *p = 42;
  return 0;
}

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