https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86092
--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Srinivas Achary from comment #2) > Is there any possibility to make this code work, Remove the 'const', or add 'volatile'. > without changing the variable attribute. -O0 > GCC-4 has no issue with this code. What special flags > have been included in the GCC-5. We don't add a new flag for every little optimization that might break invalid code.