https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84723
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2018-03-06 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 Known to fail| |8.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed. The first revision to ICE is r250736 (gcc 8.0.0), which is also where attribute naked was added. r250736 | uros | 2017-07-31 06:22:41 -0400 (Mon, 31 Jul 2017) | 23 lines PR target/25967 * config/i386/i386.c (ix86_function_naked): New function. (ix86_can_use_return_insn_p): Return false for naked functions. (ix86_expand_prologue): Skip prologue for naked functions. (ix86_expand_epilogue): Skip epilogue for naked functions and emit trap instruction. (ix86_warn_func_return): New function. (ix86_attribute_table): Add "naked" attribute specification. (TARGET_WARN_FUNC_RETURN): Define. * doc/extend.texi (x86 Function Attributes) <naked>: Document it. Another test case: __attribute__((target_clones ("avx", "default"))) __attribute__((noclone)) void foo (void) { } The create_target_clone() function assumes the call to cgraph_node::create_version_clone_with_body() succeeds, which isn't necessarily the case. But mutually exclusive attributes should be detected earlier on, during parsing, so if target_clones is incompatible with naked, GCC should issue a warning and drop the latter attribute.