view gcc/testsuite/gcc.dg/20061124-1.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do run } */
/* { dg-require-effective-target sync_char_short } */
/* { dg-options "-mcpu=v9" { target sparc*-*-* } } */

/* This testcase failed on s390 because no compare instruction for
   the check of FLAG was emitted.  */

unsigned short int count = 0;
int flag = 1;

extern void abort (void);
extern void exit (int);

int
main ()
{
  __sync_add_and_fetch (&count, -1);

  if (!flag)
    abort ();
  exit (0);
}