Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / static-init-1.C
blob36c60077ce1279bdd4566c7f6c953ffab0a0db59
1 // PR sanitizer/66190
2 // { dg-do compile }
3 // { dg-options "-fsanitize=null -std=c++11" }
5 class A {
6 public:
7   void fn1 (int);
8 };
10 class G {
11   ~G ();
12   A t;
13   virtual void fn2 () {
14     static int a;
15     static int &b = a;
16     static int &c (a);
17     static int &d {a};
18     t.fn1 (b);
19   }
21 G ::~G () {}