// 2011 Oct 22; Moc OS X 10.7.2 // Apple bug #10311664 // gcc a.c -O1 -Wall #include int main(){ double to[5]; double *u = &to[4]; int j = 5; to[0]=0; while (j-- >= 1) (u--)[0] += 42; // Increase each element of array. {int j; for(j=0; j<5; ++j) printf("%e\n", to[j]);} return to[1];} // Returns 0; should return 42; witness clang. /* (gdb) disass main Dump of assembler code for function main: ... 0x0000000100000ed0 : movsd -0x68(%rbp,%rax,1),%xmm1 0x0000000100000ed6 : addsd %xmm0,%xmm1 0x0000000100000eda : movsd %xmm1,-0x68(%rbp,%rax,1) 0x0000000100000ee0 : add $0xfffffffffffffff0,%rax 0x0000000100000ee4 : jne 0x100000ed0 ... End of assembler dump. Note address increment of -16 at 0x100000ee0 gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) */