1 // { dg-do run } 2 // GROUPS passed operators 3 // copy file 4 // From: gfm@mencon.mencon.oz.au (Graham Menhennitt) 5 // Date: Thu, 29 Apr 93 20:53:07 EST 6 // Subject: 4 bugs in g++ 2.3.3 7 // Message-ID: <9304291053.AA00090@mencon> 8 9 #include <stdio.h> 10 11 int pass = 0; 12 struct A { AA13 A(void) {} AA14 A(const A& a) { ; } 15 A& operator = (const A& a) { pass = 1; return *this; } 16 }; 17 18 struct B { BB19 B(const A& aa) { B::a = aa; } 20 A a; 21 }; 22 main(void)23int main(void) 24 { 25 B b = A(); 26 if (pass) 27 printf ("PASS\n"); 28 else 29 { printf ("FAIL\n"); return 1; } 30 } 31