aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr78312.c
blob: 470e5b2ea0a8e97275cb86e0575583d4698ace90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do run } */

typedef unsigned short u16;

static u16 a;

u16 __attribute__ ((noinline, noclone))
foo (int p1)
{
  a = -(p1 > 0);
  a *= 0 != a;
  a *= (unsigned)a;
  return a;
}

int
main ()
{
  u16 x = foo (1);
  if (x != 1)
    __builtin_abort();
  return 0;
}