https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81977
--- Comment #1 from vvarada at codeaurora dot org --- FYI: The issue shows up on previous versions of GCC compiler as well, as early as 4.9.2 (have not tried earlier versions). Also if the "buffer" in main is declared as a static uint8_t array, the issue does not show up. For some reason it shows up only when buffer is a pointer as shown in the source snippet.