2 // g++ 1.36.1 bug 900121_02
4 // Assignment of structs is defined as memberwise assignment,
5 // however g++ (1.36.2) and Cfront 2.0 differ on the definition
6 // of assignment for unions.
8 // (NOTE: Stroustrup now says that assignment of unions which contain either
9 // members or sub-members (base classes are not allowed for unions) which
10 // have non-default assignment operators defined for them will be illegal
13 // g++ (1.36.2) on the other hand, accepts this program without errors.
15 // keywords: unions, operator=, inheritance, members
21 void operator= (s0 & arg)
31 void operator= (s1 & arg)
38 s0 u0_member_0; // { dg-error "" }
39 s1 u0_member_1; // { dg-error "" }
47 u0_object_0 = u0_object_1;
50 int main () { return 0; }