view gcc/testsuite/gcc.target/arm/cond_sub_restrict_it.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-options "-mthumb -O -mrestrict-it" }  */

int a;

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

int
main (void)
{
  a = 10;
  if (fn1 (4, 4) != 9)
    __builtin_abort ();

  a = 5;
  if (fn1 (3, 4) != 5)
    __builtin_abort ();

  return 0;
}