OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900331_02.C] - Diff between revs 305 and 338

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

Rev 305 Rev 338
// { dg-do run  }
// { dg-do run  }
// g++ 1.37.1 bug 900331_02
// g++ 1.37.1 bug 900331_02
// g++ fails to treat conditional expressions which yield composite type
// g++ fails to treat conditional expressions which yield composite type
// (i.e. struct type, union type, or class type) lvalues as if they did
// (i.e. struct type, union type, or class type) lvalues as if they did
// in fact yield lvalues in all cases.
// in fact yield lvalues in all cases.
// Cfront 2.0 passes this test.
// Cfront 2.0 passes this test.
// keywords: conditional operator?:, lvalues, composite types
// keywords: conditional operator?:, lvalues, composite types
struct struct0 {
struct struct0 {
  int data_member;
  int data_member;
};
};
struct0 object0;
struct0 object0;
struct0 object1;
struct0 object1;
struct0 object2;
struct0 object2;
int i;
int i;
void function0 ()
void function0 ()
{
{
  (i ? object0 : object1).data_member = 99;     // { dg-bogus "" }
  (i ? object0 : object1).data_member = 99;     // { dg-bogus "" }
  (i ? object0 : object1) = object2;            // { dg-bogus "" }
  (i ? object0 : object1) = object2;            // { dg-bogus "" }
}
}
int main () { return 0; }
int main () { return 0; }
 
 

powered by: WebSVN 2.1.0

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