aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/pr42685.C
blob: 3c55955accc296037f2965c92758d430061c13fb (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do compile }
// { dg-options "-O -funroll-loops -fcompare-debug" }
// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }

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