aboutsummaryrefslogtreecommitdiff
path: root/tests/performance/24_fold_global_const.sy
blob: 72b28296d9455a325c4beb750bc85f13a259197e (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
25
int a[3][4][5] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59};
int b[100];
int d[100];
int c = 50;

void f() {
  b[a[1][2][3]] = 5;
  b[c] = 7;
}

void g(int x[]) {
  x[c] = 9;
}

int main() {
  putint(a[2][3][3]); putch(10);
  putint(a[2][3][4]); putch(10);
  putint(a[2][3][4]); putch(10);
  putint(c); putch(10);
  f();
  putint(b[a[1][2][3]]); putch(10);
  g(d);
  putint(d[c]); putch(10);
  return 0;
}