2014-04-15 Max Ostapenko <m.ostapenko@partner.samsung.com>
[official-gcc.git] / gcc / testsuite / c-c++-common / ubsan / null-3.c
blobb1eb3dbc736cbbfcd313b5cb875c9c8b7e42c8dc
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\n|\r)" } */