Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git] / main / gcc / testsuite / c-c++-common / ubsan / null-3.c
blobf58562c63b8c8f34ec3071dee1d9a883abb33844
1 /* { dg-do run } */
2 /* { dg-options "-fsanitize=null -w" } */
3 /* { dg-shouldfail "ubsan" } */
5 int
6 foo (int *p)
8 return *p;
11 int
12 main (void)
14 int **p = 0;
15 return foo (*p);
18 /* { dg-output "load of null pointer of type 'int \\*'(\n|\r\n|\r)" } */