When the following program is compiled with gcc the output of the array-value is 1 2 3 4 5 6. Icc and cl produce the output 1 2 3 4 1 2. If the arrray is susbtituted by a simple scalar, the gcc output is 1 2 3 4 1 2, too. I don't know if the statement if even valid and behavior-defined C code. If it's not, then gcc maybe should warn somehow. Thanks, Gregor PS: This hapens with gcc-snapshot 20070720-1, too.
Created attachment 14049 [details] Simple testcase
I've found: http://c-faq.com/expr/seqpoints.html *** This bug has been marked as a duplicate of 11751 ***