2014-07-29 Ed Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / c-c++-common / vla-1.c
blob401c4e05511726db87daa39b856648c258e278e9
1 /* Test that changes to a variable are reflected in a VLA later in the
2 expression. */
3 /* { dg-options "" } */
5 #ifdef __cplusplus
6 extern "C"
7 #endif
8 void abort();
10 int i = 4;
11 int f()
13 return i;
16 int main()
18 if (i+=2, sizeof(*(int(*)[f()])0) != 6*sizeof(int))
19 abort();
20 return 0;