[Bug middle-end/99151] Missed optimization: Superfluous stack frame and code with noreturn or __builtin_unreachable()

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 1 12:53:03 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> This nop behaviour could be a bit inconsistent across architectures. For
> example, arm and powerpc don't generate a nop here.

Well, it's low-level trickery so architecture-dependent by definition.

> I still think that the profiling counter increment in the
> __builtin_unreachable() path is a bug.

How so?  I only see a missed optimization, but with -fprofile-arcs
-ftest-coverage you're splitting hairs IMO.


More information about the Gcc-bugs mailing list