2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / bf64-1.c
blob60028fb1aa851ce39c291a090cccae873a51c035
1 struct tmp
3 long long int pad : 12;
4 long long int field : 52;
5 };
7 struct tmp2
9 long long int field : 52;
10 long long int pad : 12;
13 struct tmp
14 sub (struct tmp tmp)
16 tmp.field |= 0x0008765412345678LL;
17 return tmp;
20 struct tmp2
21 sub2 (struct tmp2 tmp2)
23 tmp2.field |= 0x0008765412345678LL;
24 return tmp2;
27 main()
29 struct tmp tmp = {0x123, 0xFFF000FFF000FLL};
30 struct tmp2 tmp2 = {0xFFF000FFF000FLL, 0x123};
32 tmp = sub (tmp);
33 tmp2 = sub2 (tmp2);
35 if (tmp.pad != 0x123 || tmp.field != 0xFFFFFF541FFF567FLL)
36 abort ();
37 if (tmp2.pad != 0x123 || tmp2.field != 0xFFFFFF541FFF567FLL)
38 abort ();
39 exit (0);