aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitint-109.c
blob: 84c4314cdf9dc05eec60daa84ae2fb25467710b1 (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
/* PR middle-end/116486 */
/* { dg-do run { target bitint } } */
/* { dg-options "-O2 -fno-tree-ccp" } */

unsigned u;

#if __BITINT_MAXWIDTH__ >= 129
#define N 0x100000000000000000000000000000000uwb
#else
#define N 0xffffffffffffffffuwb
#endif

int
foo (void)
{
  return __builtin_stdc_first_leading_one (u / N);
}

int
main ()
{
  int x = foo ();
  if (x)
    __builtin_abort ();
}