summaryrefslogtreecommitdiff
path: root/test/regression/init2.c
blob: 400bd94ccd1053f37dff31bb2908dae3c70a6971 (plain)
1
2
3
4
5
6
7
8
/* Initialization of local const array */

int f(int x)
{
  const int dfl = 2;
  const int tbl[3] = { 12, 34, 56 };
  return tbl[x >= 0 && x < 3 ? x : dfl];
}