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