1// { dg-do run  }
2// g++ 1.37.1 bug 900331_02
3
4// g++ fails to treat conditional expressions which yield composite type
5// (i.e. struct type, union type, or class type) lvalues as if they did
6// in fact yield lvalues in all cases.
7
8// Cfront 2.0 passes this test.
9
10// keywords: conditional operator?:, lvalues, composite types
11
12struct struct0 {
13  int data_member;
14};
15
16struct0 object0;
17struct0 object1;
18struct0 object2;
19
20int i;
21
22void function0 ()
23{
24  (i ? object0 : object1).data_member = 99;	// { dg-bogus "" }
25  (i ? object0 : object1) = object2;		// { dg-bogus "" }
26}
27
28int main () { return 0; }
29