OSDN Git Service

PR libstdc++/37907
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.bob / inherit2.C
1 // { dg-do assemble  }
2 #include <stdlib.h>
3
4 class A {
5 public:
6   void z();
7   A(void) {}
8 private:
9   A(const A &) { abort(); } // { dg-error "private" } 
10   const A& operator =(const A &) { abort(); }
11 };
12
13 class B : public A { // { dg-error "within" }
14 public:
15   B(void) {}
16 };
17
18 void f(B b) {
19 }
20
21 void g() {
22   B h;
23   f(h); // { dg-error "argument" "arg" } 
24   // { dg-message "synthesized" "synth" { target *-*-* } 23 }
25 }