OSDN Git Service

PR tree-optimization/15262
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / bf64-1.c
1 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 }