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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/32346
2
// { dg-do run }
3
// { dg-options "-Wno-overflow" }
4
 
5
extern "C" void abort();
6
 
7
struct S {
8
  long long i : 32;
9
};
10
 
11
void f(int i, int j) {
12
  if (i != 0xabcdef01)
13
    abort();
14
  if (j != 0)
15
    abort();
16
}
17
 
18
void g(S s) {
19
  f(s.i, 0);
20
}
21
 
22
int main() {
23
  S s;
24
  s.i = 0xabcdef01;
25
  g(s);
26
}

powered by: WebSVN 2.1.0

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