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

int
main (void)
{
  _Complex double *p = 0;
  if (p[0])
    return 42;
  return 0;
}

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