]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/ubsan/null-10.c
config/
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / ubsan / null-10.c
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=null -w" } */
3 /* { dg-shouldfail "ubsan" } */
4 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
5
6 int
7 main (void)
8 {
9 short *p = 0, *u;
10 *(u + *p) = 23;
11 return 0;
12 }
13
14 /* { dg-output "load of null pointer of type 'short int'(\n|\r\n|\r)" } */