* ru.po: Update.
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / static-init-3.C
blob7fd6cbd036ad98fa7e9f4bcbe5d3b8c2f80caa2c
1 // PR sanitizer/66190
2 // { dg-do run }
3 // { dg-options "-fsanitize=null -std=c++11" }
5 int *fn (void) { return 0; }
7 int
8 main ()
10   static int a;
11   static int &b = *fn ();
12   static int &c (*fn ());
13   static int &d {*fn ()};
14   return 0;
17 // { dg-output "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'" }