https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84210
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=107300 Last reconfirmed|2021-12-19 00:00:00 |2024-4-3 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- And then there was an issue where we convert __builtin_unreachable to __builtin_trap which had the similar issue so we added: DEF_GCC_BUILTIN (BUILT_IN_UNREACHABLE_TRAP, "unreachable trap", BT_FN_VOID, ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST) instead, see PR 107300 for the issue there. So the question becomes why was __builtin_unreachable marked as const, I have no idea. Anyways reconfirmed.