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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [bitfield1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Check that we handle bitfields as complex lvalues properly.
2
 
3
struct A
4
{
5
  int i: 2;
6
  int j: 2;
7
  int k: 2;
8
};
9
 
10
A a, a2;
11
bool b;
12
void f ();
13
 
14
int main ()
15
{
16
  (f(), a.j) = 1;
17
  (f(), a).j = 2; // { dg-warning "overflow" }
18
  (b ? a.j : a2.k) = 3; // { dg-warning "overflow" }
19
  (b ? a : a2).j = 0;
20
  ++(a.j) = 1;
21
  (a.j = 2) = 3; // { dg-warning "overflow" }
22
}
23
 
24
 

powered by: WebSVN 2.1.0

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