OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20050603-2.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
#include <stdlib.h>
4
struct s {
5
  unsigned short f: 16;
6
  unsigned short y: 8;
7
  unsigned short g: 2;
8
  unsigned int x;
9
};
10
 
11
void set (struct s*, int) __attribute__((noinline));
12
void set (struct s* p, int flags) {
13
  p->g = flags << 1;
14
}
15
main() {
16
  struct s foo = {0 , 0, 3, 0};
17
  set (&foo, -1);
18
  if (foo.g != 2)
19
    abort();
20
  return 0;
21
}

powered by: WebSVN 2.1.0

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