aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/ctor4.C
blob: 70643ec4e10cd456d9e3fb99f3fd491f4c75fd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/17788
// { dg-do compile }

class foo {
public:
  foo();
};

class bar: public foo {// { dg-error "uninitialized" }
private:
  int &a;
};

foo::foo() {
}

int main(int argc, char **argv)
{
  bar x; // { dg-error "synthesized" }
}