Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / null-3.C
blobcd3716b3eb3d1478c800d6f0653219801f668849
1 // { dg-do run }
2 // { dg-options "-fsanitize=null" }
4 int
5 main (void)
7   int *p = 0;
9   int &r1 = *p;
10   int &r2 = *p;
11   int &r3 = *p;
12   int &r4 = *p;
13   int &r5 = *p;
16 // { dg-output "reference binding to null pointer of type 'int'(\n|\r\n|\r)" }
17 // { dg-output "\[^\n\r]*reference binding to null pointer of type 'int'(\n|\r\n|\r)" }
18 // { dg-output "\[^\n\r]*reference binding to null pointer of type 'int'(\n|\r\n|\r)" }
19 // { dg-output "\[^\n\r]*reference binding to null pointer of type 'int'(\n|\r\n|\r)" }
20 // { dg-output "\[^\n\r]*reference binding to null pointer of type 'int'(\n|\r\n|\r)" }