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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p4173.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do assemble  }
// { dg-do assemble  }
// { dg-options "-Wall -ansi -pedantic-errors" }
// { dg-options "-Wall -ansi -pedantic-errors" }
// This error happens because lvalue is not done well in the C++ front-end.
// This error happens because lvalue is not done well in the C++ front-end.
// NOPs should be lvalues if their arguments are.
// NOPs should be lvalues if their arguments are.
// NON_LVALUE_EXPRs shouldn't be.
// NON_LVALUE_EXPRs shouldn't be.
// prms-id: 4173
// prms-id: 4173
enum TypeKind {
enum TypeKind {
    RecordTypeKind
    RecordTypeKind
};
};
struct Type
struct Type
{
{
    enum TypeKind kind : 8;
    enum TypeKind kind : 8;
    unsigned char prefixLen;
    unsigned char prefixLen;
};
};
Type a;
Type a;
Type b;
Type b;
TypeKind c;
TypeKind c;
int
int
main() {
main() {
  a.kind = b.kind = c;
  a.kind = b.kind = c;
  (a.kind = c) = b.kind;        // { dg-bogus "" }
  (a.kind = c) = b.kind;        // { dg-bogus "" }
}
}
 
 

powered by: WebSVN 2.1.0

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