view gcc/testsuite/gcc.c-torture/compile/memtst.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-add-options stack_size } */

#ifdef STACK_SIZE
#define SIZE STACK_SIZE / 8
#else
#define SIZE 65536
#endif

memtst (int *p, int a)
{
  do
    {
      if (p[a] == 1)
	break;
    }
  while (--a);
}

main ()
{
  int a[SIZE];
  int i;
  bzero (a, SIZE * 4);
  for (i = 0;  i < 100;  i++)
    {
      memtst (a, SIZE);
    }
}