Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / c-c++-common / ubsan / null-9.c
blobab43d22a325a6d043efc7d9875a792b94912f692
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=null -w" } */
3 /* { dg-shouldfail "ubsan" } */
5 union U {
6 int i;
7 };
9 int
10 main (void)
12 union U *u = 0;
13 return u->i;
16 /* { dg-output "member access within null pointer of type 'union U'(\n|\r\n|\r)" } */