https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25967
--- Comment #15 from Uroš Bizjak <ubizjak at gmail dot com> --- Please also note this description from the gcc docs: 'naked' This attribute allows the compiler to construct the requisite function declaration, while allowing the body of the function to be assembly code. The specified function will not have prologue/epilogue sequences generated by the compiler. Only basic 'asm' statements can safely be included in naked functions (*note Basic Asm::). While using extended 'asm' or a mixture of basic 'asm' and C code may appear to work, they cannot be depended upon to work reliably and are not supported.