2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / p4173.C
blobe07bc0695a1d1276683fc8a1cc70215654a85045
1 // { dg-do assemble  }
2 // { dg-options "-Wall -ansi -pedantic-errors" }
3 // This error happens because lvalue is not done well in the C++ front-end.
4 // NOPs should be lvalues if their arguments are.
5 // NON_LVALUE_EXPRs shouldn't be.
7 // prms-id: 4173
9 enum TypeKind {
10     RecordTypeKind
12 struct Type
14     enum TypeKind kind : 8;
15     unsigned char prefixLen;  
18 Type a;
19 Type b;
20 TypeKind c;
22 int
23 main() {
24   a.kind = b.kind = c;
25   (a.kind = c) = b.kind;        // { dg-bogus "" }