aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitint-108.c
blob: 170d4bdf09ca060a4e4aeb74a49da44b60d298e6 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* PR middle-end/115887 */
/* { dg-do compile { target { bitint && int128 } } } */
/* { dg-options "-O -fnon-call-exceptions -finstrument-functions -w" } */

float f;
#if __BITINT_MAXWIDTH__ >= 1024
#define N1024 1024
#define N127 127
#define N256 256
#else
#define N1024 64
#define N127 64
#define N256 64
#endif

_BitInt(N1024) a;

static inline void
bar (_BitInt(N127) b, _BitInt(N256) c, int,
     int, int, int, int, int, int, int, int, 
     int, int, int, int, int, int, int, int,
     int *)
{
  b %= 0;
  do
    c -= *(short *) 0;
  while (__builtin_add_overflow_p (a, 0, 0));
  __int128 d = b + c + f;
}

void
foo (void)
{
  int x;
  bar (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &x);
  while (x)
    ;
}