summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/pr42685.C
blob: b8b1ad63b1b46eb6c03fa549918732dd55e1e31e (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-do compile }
// { dg-options "-O -funroll-loops -fcompare-debug" }

void Remap(int n, int *src, int *dst, int *map)
{
  do {
    int i = *src;
    if (i != 0) *dst = map[i];
  } while (--n != 0);
}