OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p4173.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { 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.
6
 
7
// prms-id: 4173
8
 
9
enum TypeKind {
10
    RecordTypeKind
11
};
12
struct Type
13
{
14
    enum TypeKind kind : 8;
15
    unsigned char prefixLen;
16
};
17
 
18
Type a;
19
Type b;
20
TypeKind c;
21
 
22
int
23
main() {
24
  a.kind = b.kind = c;
25
  (a.kind = c) = b.kind;        // { dg-bogus "" }
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.