aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ubsan/pr59250.C
blob: e438d24fda98b1159eebc54a748d538a56eac63c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR sanitizer/59250
// { dg-do compile }
// { dg-options "-fsanitize=undefined" }

struct E {
 int i;
};

struct S {
  const char *s;
  S (const char *);
  static E *e;
};

S::S (const char *) : s (0)
{
  e = new E ();
}