aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/bitint-52.c
blob: d2896da2f9a9375eed97161a8fb27dd23dcad2a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR middle-end/113574 */
/* { dg-do run { target bitint } } */
/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests }  { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */

unsigned _BitInt(1) a;
unsigned _BitInt(8) b;

void
foo (unsigned _BitInt(16) x)
{
  a += (x << 2) | b;
}

int
main ()
{
  foo (0xfef1uwb);
  if (a)
    __builtin_abort ();
  return 0;
}