summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/pr44086.C
blob: e3304f4a27b38ceb034c9210ddbe1ce25bc88658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/44086
// { dg-do compile }

struct A
{
    int const i : 2; // { dg-message "should be initialized" }
};

void f()
{
    A a;    // { dg-error "uninitialized const" }
    new A;  // { dg-error "uninitialized const" }
    A();
    new A();
}