summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/vrp38.c
blob: b740c60242c9c8d1c18f10adbf1da213639d108e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do run } */
/* { dg-options "-O2" } */

int __attribute__((noinline))
foo(char c)
{
  unsigned short a = (unsigned short)c;
  if (a >= -32000 && a <= 32000)
    return c == 0;
  return -1;
}

extern void abort (void);

int main()
{
  if (foo(1) == 1)
    abort ();
  return 0;
}