aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/movcond_restrict_it.c
blob: f1f9cfa351bb8c2732c3dced30d8bc17f0aa573d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do run } */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-options "-mthumb -O3 -mrestrict-it" }  */

int a;

__attribute__ ((noinline, noclone)) int
fn1 (int c, int d)
{
  if (c > d)
    a = 1;
  else
    a = -1;
  return a;
}

int
main (void)
{
  if (fn1 (4, 5) != -1)
    __builtin_abort ();

  if (fn1 (5, 4) != 1)
    __builtin_abort ();

  return 0;
}