OSDN Git Service

* g++.dg/init/new1.C, g++.dg/template/alignof1.C,
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / init / copy1.C
1 // { dg-do compile }
2
3 class A {
4 public:
5     A(){}
6     A( const A& a ){}
7 };
8
9 class B  : public A
10 {
11 public:
12   B( int& s) : s_(s){}
13   int& s_;
14 };
15
16 int main()
17 {
18   int i;
19   B x1( i );
20   B x2( x1 );
21 }