https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68484
--- Comment #8 from Vladimir Sedach <vvsed at hotmail dot com> --- Adding "static" to "volatile" "solves" the problem: static int * volatile x = _x; I'm using this trick to avoid aggressive optimization when measuring the time of execution. The compiler does not skip calculations leading to saving the result in a loop.