705635c0d84fa7464aabdf0d089c942d3b7ea15f
[gcc.git] / gcc / testsuite / c-c++-common / ubsan / null-6.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 unsigned long int *p = 0;
10 *p = 42;
11 return 0;
12 }
13
14 /* { dg-output "store to null pointer of type 'long unsigned int'(\n|\r\n|\r)" } */