aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/data-model-17.c
blob: d50b84ab43aee84fb677fe5bdecdd2895927bbc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
typedef struct foo {} foo_t;

typedef void (*func_t)(foo_t *s);

void cb_1 (foo_t *s);
void cb_2 (foo_t *s);

typedef struct config_s {
  func_t func;
} config;

static const config table[2] = {
  { cb_1 },
  { cb_2 }
};

int deflate (foo_t *s, int which)
{
  (*(table[which].func))(s);
}