aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr112672.c
blob: 583e9fdfb8b9f1490321b82937ddf7fecdea1465 (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 target/112672 */
/* { dg-do run } */
/* { dg-options "-O2" } */

typedef unsigned short u16;

u16 g = 254;

static inline u16
foo (u16 u)
{
  u *= g;
  return u + __builtin_parityl (u);
}

int
main (void)
{
  u16 x = foo (4);
  if (x != 4 * 254 + 1)
    __builtin_abort ();
  return 0;
}