gcc/testsuite/g++.old-deja/g++.jason/opeq6.C
raw| 1 | // { dg-do assemble } |
| 2 | // Testcase for wrongful generation of operator =. |
| 3 | |
| 4 | class ivResource { |
| 5 | public: |
| 6 | ivResource (); |
| 7 | private: |
| 8 | ivResource & operator =(const ivResource &); |
| 9 | }; |
| 10 | |
| 11 | class ivButtonState : virtual public ivResource { |
| 12 | public: |
| 13 | void operator=(ivButtonState &); |
| 14 | }; |
| 15 | |
| 16 | class ivPrintBS : public ivButtonState { |
| 17 | }; |
| 18 | |
| 19 | void f () |
| 20 | { |
| 21 | ivPrintBS a, b; |
| 22 | a = b; |
| 23 | } |
| 24 |