150476Speter// g++ 1.37.1 bug 900331_03
220031Sphk
320031Sphk// Special Options: -ansi
420031Sphk
520031Sphk// The following code causes g++ to abort.
620031Sphk
720031Sphk// Curiously, the abort does not occur if the -pedantic option is used.
820031Sphk
920031Sphk// Cfront 2.0 passes this test.
1020031Sphk
1120031Sphk// Keywords: abort, conditional operator?:, lvalues, composite types
1220031Sphk
1320031Sphkstruct struct0 {
1420031Sphk  int data_member;
1520031Sphk
1620031Sphk  virtual void function_member () {}	// contributes to the abort
1720031Sphk};
1820031Sphk
1920031Sphkstruct0 object0;
2020031Sphkstruct0 object1;
2120031Sphkstruct0 object2;
2220031Sphk
2320031Sphkint i;
2420031Sphk
2520031Sphkvoid function0 ()
2620031Sphk{
2720031Sphk  object2 = (i ? object0 : object1);		// OK
2820031Sphk  (i ? object0 : object1) = object2;		// causes abort
2920031Sphk}
3020031Sphk
3120031Sphkint main () { return 0; }
3220031Sphk