gcc/testsuite/g++.old-deja/g++.bob/inherit2.C
raw| 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-message "private" } |
| 10 | const A& operator =(const A &) { abort(); } |
| 11 | }; |
| 12 | |
| 13 | class B : public A { // { dg-error "" } |
| 14 | public: |
| 15 | B(void) {} |
| 16 | }; |
| 17 | |
| 18 | void f(B b) { // { dg-message "initializing" } |
| 19 | } |
| 20 | |
| 21 | void g() { |
| 22 | B h; |
| 23 | f(h); // { dg-message "synthesized|deleted" "synth" } |
| 24 | } |