Debian Codegraph @

gcc/testsuite/c-c++-common/ubsan/null-11.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=null -w" } */
3 /* { dg-shouldfail "ubsan" } */
4
5 struct S {
6 int i;
7 };
8
9 int
10 main (void)
11 {
12 struct S **s = 0;
13 return (*s)->i;
14 }
15
16 /* { dg-output "load of null pointer of type 'struct S \\*'" } */