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/] [bf64-1.c] - Blame information for rev 307

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

Line No. Rev Author Line
1 297 jeremybenn
struct tmp
2
{
3
  long long int pad : 12;
4
  long long int field : 52;
5
};
6
 
7
struct tmp2
8
{
9
  long long int field : 52;
10
  long long int pad : 12;
11
};
12
 
13
struct tmp
14
sub (struct tmp tmp)
15
{
16
  tmp.field |= 0x0008765412345678LL;
17
  return tmp;
18
}
19
 
20
struct tmp2
21
sub2 (struct tmp2 tmp2)
22
{
23
  tmp2.field |= 0x0008765412345678LL;
24
  return tmp2;
25
}
26
 
27
main()
28
{
29
  struct tmp tmp = {0x123, 0xFFF000FFF000FLL};
30
  struct tmp2 tmp2 = {0xFFF000FFF000FLL, 0x123};
31
 
32
  tmp = sub (tmp);
33
  tmp2 = sub2 (tmp2);
34
 
35
  if (tmp.pad != 0x123 || tmp.field != 0xFFFFFF541FFF567FLL)
36
    abort ();
37
  if (tmp2.pad != 0x123 || tmp2.field != 0xFFFFFF541FFF567FLL)
38
    abort ();
39
  exit (0);
40
}

powered by: WebSVN 2.1.0

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