FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / operators16.C
blob76fcb640eaf2089ede4e420fb977ce9ff712ccd0
1 // GROUPS passed operators
2 // copy file
3 // From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
4 // Date:     Thu, 29 Apr 93 20:53:07 EST
5 // Subject:  4 bugs in g++ 2.3.3
6 // Message-ID: <9304291053.AA00090@mencon>
8 #include <stdio.h>
10 int pass = 0;
11 struct A {
12         A(void) {}
13         A(const A& a) { ; }
14         A& operator = (const A& a) { pass = 1; return *this; }
17 struct B {
18         B(const A& aa) { B::a = aa; }
19         A a;
22 int main(void)
24         B b = A();
25         if (pass)
26                 printf ("PASS\n");
27         else
28                 { printf ("FAIL\n"); return 1; }