summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr89037.c
blob: 551136741d776185a4c10b85168b425cf2ed6de4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run { target int128 } } */
/* { dg-options "" } */

struct s
{
  __int128 y : 66;
};
typedef struct s T;
T a[] = { 1, 10000, 0x12345, 0xff000001, 1ULL << 63, (__int128) 1 << 64,
	  ((__int128) 1 << 64) | 1 };

int
main (void)
{
  if (a[0].y != 1
      || a[1].y != 10000
      || a[2].y != 0x12345
      || a[3].y != 0xff000001
      || a[4].y != (1ULL << 63)
      || a[5].y != ((__int128) 1 << 64)
      || a[6].y != (((__int128) 1 << 64) | 1))
    __builtin_abort ();
  return 0;
}