2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / bitfld-5.c
blobca88d92214ed2ca165d40da73c55744c69863afe
1 /* See http://gcc.gnu.org/ml/gcc/2009-06/msg00072.html. */
3 extern void abort (void);
5 struct s
7 unsigned long long a:2;
8 unsigned long long b:40;
9 unsigned long long c:22;
12 __attribute__ ((noinline)) void
13 g (unsigned long long a, unsigned long long b)
15 asm ("");
16 if (a != b)
17 abort ();
20 __attribute__ ((noinline)) void
21 f (struct s s, unsigned long long b)
23 asm ("");
24 g (((unsigned long long) (s.b-8)) + 8, b);
27 int
28 main ()
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;