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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [bitfld-5.c] - Blame information for rev 301

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

Line No. Rev Author Line
1 297 jeremybenn
/* See http://gcc.gnu.org/ml/gcc/2009-06/msg00072.html.  */
2
 
3
extern void abort (void);
4
 
5
struct s
6
{
7
  unsigned long long a:2;
8
  unsigned long long b:40;
9
  unsigned long long c:22;
10
};
11
 
12
__attribute__ ((noinline)) void
13
g (unsigned long long a, unsigned long long b)
14
{
15
  asm ("");
16
  if (a != b)
17
    abort ();
18
}
19
 
20
__attribute__ ((noinline)) void
21
f (struct s s, unsigned long long b)
22
{
23
  asm ("");
24
  g (((unsigned long long) (s.b-8)) + 8, b);
25
}
26
 
27
int
28
main ()
29
{
30
  struct s s = {1, 10, 3};
31
  struct s t = {1, 2, 3};
32
  f (s, 10);
33
  f (t, 0x10000000002);
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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