aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitint-8.c
blob: c18fd6b63abec84f9b6a1a67a88a807be3c1f031 (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
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
/* { dg-options "-O2 -std=c23 -Wno-uninitialized" } */

#if __BITINT_MAXWIDTH__ >= 135
_BitInt(135)
foo (void)
{
  _BitInt(135) d;
  _BitInt(135) e = d + 2wb;
  return e;
}
#endif

#if __BITINT_MAXWIDTH__ >= 575
_BitInt(575)
bar (void)
{
  _BitInt(575) d;
  _BitInt(575) e = d * 42wb;
  return e;
}

_BitInt(575)
baz (int x)
{
  _BitInt(575) d;
  if (x)
    return 59843758943759843574wb;
  return d;
}
#endif

int x;