view gcc/testsuite/gcc.dg/pr42084.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-options "-O1 -fno-delete-null-pointer-checks" } */
extern void abort (void);
int g = 0;
static int __attribute__((noinline)) f (long long a, long long b)
{
  int cmp;
  cmp = a > b;
  if (&g == 0)
    cmp-=2;
  else
    cmp++;
  return cmp;
}

int main (void)
{
  int ret = f (2, 1);
  if (ret != 2)
    abort ();
  return 0;
}