Merge from trunk
[official-gcc.git] / gcc / testsuite / c-c++-common / ubsan / null-9.c
blob7fabbeca4c7f0294e5c72fbe29a69db00d7b05f7
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=null -w" } */
3 /* { dg-shouldfail "ubsan" } */
4 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
6 union U {
7 int i;
8 };
10 int
11 main (void)
13 union U *u = 0;
14 return u->i;
17 /* { dg-output "member access within null pointer of type 'union U'(\n|\r\n|\r)" } */