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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900331_02.C] - Blame information for rev 823

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { 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
 
12
struct struct0 {
13
  int data_member;
14
};
15
 
16
struct0 object0;
17
struct0 object1;
18
struct0 object2;
19
 
20
int i;
21
 
22
void function0 ()
23
{
24
  (i ? object0 : object1).data_member = 99;     // { dg-bogus "" }
25
  (i ? object0 : object1) = object2;            // { dg-bogus "" }
26
}
27
 
28
int main () { return 0; }

powered by: WebSVN 2.1.0

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