887dfdcdb9ff5bd32cc42395a22edad0a7224d78
[gcc.git] / gcc / testsuite / c-c++-common / ubsan / null-1.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 int *p = 0;
10 return *p;
11 }
12
13 /* { dg-output "load of null pointer of type 'int'(\n|\r\n|\r)" } */