[Bug middle-end/64711] Unconsistency with -fnon-call-exceptions when used along inline and ipa optimizations and memmov

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 12 14:43:57 GMT 2020


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

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The issue with clearing nothrow is that those pesky builtins have
> that "sticky" while the per-stmt flag (gimple_call_nothrow ())
> just amends it.  Guess we might want to fix that (in gimple_call_flags)
> and then clear the flag always for -fnon-call-exceptions?
> 
> I suppose all/most noexcept specifications in libstdc++ are similarly
> questionable.

Let's not use too big a hammer though, -fnon-call-exceptions works fine for
languages (Ada, Go) that enable it by default and I'm quite wary of C++ folks
who try it once in a while, want to pessimize it because it doesn't work on
their questionable testcase, and then forget about it.

Why not just extend what's done in build_common_builtin_nodes for
__builtin_alloca to the family of __builtin_mem* functions?


More information about the Gcc-bugs mailing list