URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
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; }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.