aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr110777.c
blob: 0c10590bcda87871dfb39b149c4e9a348031982b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-O3 -w" } */

void pm_message (int);
void _setjmp (void);
int *findOrAddBackgroundInPalette_palette_pnm;
static void findOrAddBackgroundInPalette(unsigned *paletteSizeP,
                                    int *backgroundIndexP) {
  if (*paletteSizeP) {
    *backgroundIndexP = (*paletteSizeP)++;
    pm_message(0);
  }
  pm_message(findOrAddBackgroundInPalette_palette_pnm[*backgroundIndexP]);
}
void computeColorMap(int *backgroundIndexP) {
  unsigned paletteSize;
  findOrAddBackgroundInPalette(&paletteSize, backgroundIndexP);
}
int main() {
  unsigned backgroundIndex;
  _setjmp();
  computeColorMap(&backgroundIndex);
}