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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/31513
2
// { dg-do run }
3
 
4
extern "C" void abort();
5
 
6
struct tree_type {
7
  unsigned int precision : 9;
8
};
9
 
10
void bork(unsigned int i) {
11
  if (i != 7)
12
    abort();
13
}
14
 
15
void foo(struct tree_type *t)
16
{
17
  bork(t->precision);
18
}
19
 
20
int main() {
21
  tree_type t;
22
  t.precision = 7;
23
  foo(&t);
24
}

powered by: WebSVN 2.1.0

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