aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/init/ctor4-1.C
blob: 1333b35f9ddf9c53c94c9f195712388fbc2360a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }

class foo {
public:
  foo();
};

class bar: public foo {	// { dg-error "uninitialized" }
		   // { dg-message "implicitly deleted" "" { target c++11 } 8 }
private:
  int const a; // { dg-message "should be initialized" }
};

foo::foo() {
}

int main(int argc, char **argv)
{
  bar x; // { dg-error "deleted" "" { target c++11 } }
	 // { dg-message "synthesized" "" { target { ! c++11 } } 19 }
}