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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr45017.c] - Blame information for rev 698

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
2
 
3
int tester(char *bytes)
4
{
5
  union {
6
      struct {
7
          unsigned int r1:4;
8
          unsigned int r2:4;
9
      } fmt;
10
      char value[1];
11
  } ovl;
12
 
13
  ovl.value[0] = bytes[0];
14
  return ovl.fmt.r1;
15
}
16
extern void abort (void);
17
int main()
18
{
19
  char buff = 0x2f;
20
  if (tester(&buff) != 0x0f)
21
    abort ();
22
  return 0;
23
}
24
 

powered by: WebSVN 2.1.0

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