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

typedef enum { LangC } cLanguage;
typedef enum { FunctionOneArg, FunctionStandard } cFunctionType;
void *CCTK_CallFunction_function;
cLanguage CCTK_CallFunction_fdata_0;
cFunctionType CCTK_CallFunction_fdata_1;
void CCTK_CallFunction_data() {
  void (*standardfunc)();
  int (*oneargfunc)();
  switch (CCTK_CallFunction_fdata_1) {
  case FunctionOneArg:
    oneargfunc = CCTK_CallFunction_function;
    oneargfunc(CCTK_CallFunction_data);
    break;
  case FunctionStandard:
    switch (CCTK_CallFunction_fdata_0) {
    case LangC:
      standardfunc = CCTK_CallFunction_function;
      standardfunc(CCTK_CallFunction_data);
    }
  }
}