view gcc/testsuite/gcc.dg/torture/pr48343.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

/* PR debug/48343 */
/* { dg-do compile } */
/* { dg-options "-fcompare-debug" } */

void foo (unsigned char *, unsigned char *);

void
test (unsigned int x, int y)
{
  unsigned int i, j = 0, k;
  unsigned char s[256], t[64];
  foo (s, t);
  t[0] = y;
  for (i = 0; i < 256; i++)
    {
      j = (j + s[i] + t[i % x]) & 0xff;
      k = i; i = j; j = k;
    }
}