https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61502
--- Comment #19 from Alexander Cherepanov <ch3root at openwall dot com> --- (In reply to jos...@codesourcery.com from comment #3) > Except within a larger object, I'm not aware of any reason the cases of > two objects following or not following each other in memory must be > mutually exclusive. Apparently some folks use linker scripts to get a specific arrangement of objects. A fresh example is a problem in Linux -- https://lkml.org/lkml/2016/6/25/77 . A simplified example from http://pastebin.com/4Qc6pUAA : extern int __start[]; extern int __end[]; extern void bar(int *); void foo() { for (int *x = __start; x != __end; ++x) bar(x); } This is optimized into an infinite loop by gcc 7 at -O.