summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/ifcvt-onecmpl-abs-1.c
blob: 679e552f8482db43f0401c04249da619fb00cf5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
extern void abort(void);

__attribute__ ((noinline))
int foo(int n)
{
  if (n < 0)
    n = ~n;

  return n;
}

int main(void)
{
  if (foo (-1) != 0)
    abort ();

  return 0;
}