testcase for sideeffects problems
[cparser] / parsetest / sideeffects.c
1 int puts(const char *str);
2
3 int arr[100];
4
5 int main(void) {
6         arr[puts("hello1")] += 5;
7         arr[puts("hello2")] -= 5;
8         arr[puts("hello3")] *= 5;
9         arr[puts("hello4")] /= 5;
10         arr[puts("hello5")] %= 5;
11         arr[puts("hello6")] &= 5;
12         arr[puts("hello7")] |= 5;
13         arr[puts("hello8")] ^= 5;
14         arr[puts("hello9")]++;
15         arr[puts("hello10")]--;
16         ++arr[puts("hello11")];
17         --arr[puts("hello12")];
18         return 0;
19 }