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

int
main (void)
{
  unsigned int len = 1;
  float (*P)[len][len] = 0;
  (*P)[0][0] = 1;
  return 0;
}

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