PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / bf64-1.c
blobc9241e281c59ef399974aa4a657f59714d338d4e
1 /* { dg-xfail-if "ABI specifies bitfields cannot exceed 32 bits" { mcore-*-* } } */
2 struct tmp
4 long long int pad : 12;
5 long long int field : 52;
6 };
8 struct tmp2
10 long long int field : 52;
11 long long int pad : 12;
14 struct tmp
15 sub (struct tmp tmp)
17 tmp.field |= 0x0008765412345678LL;
18 return tmp;
21 struct tmp2
22 sub2 (struct tmp2 tmp2)
24 tmp2.field |= 0x0008765412345678LL;
25 return tmp2;
28 main()
30 struct tmp tmp = {0x123, 0xFFF000FFF000FLL};
31 struct tmp2 tmp2 = {0xFFF000FFF000FLL, 0x123};
33 tmp = sub (tmp);
34 tmp2 = sub2 (tmp2);
36 if (tmp.pad != 0x123 || tmp.field != 0xFFFFFF541FFF567FLL)
37 abort ();
38 if (tmp2.pad != 0x123 || tmp2.field != 0xFFFFFF541FFF567FLL)
39 abort ();
40 exit (0);