[Bug c++/97553] [missed optimization] constexprness not noticed when UBsan enabled

eyalroz at technion dot ac.il gcc-bugzilla@gcc.gnu.org
Mon Oct 26 20:46:29 GMT 2020


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

--- Comment #5 from Eyal Rozenberg <eyalroz at technion dot ac.il> ---
(In reply to Jakub Jelinek from comment #4)
> Depends on what you mean by properly.  -O3 can be used with sanitization,
> but expecting the code to be optimized the same way as without sanitization
> is wrong, it is more important to catch as many bugs as possible, and the
> runtime instrumentation slows things down anyway.  The sanitization is not
> meant to be used for production code, only when debugging it.

I wonder, then, if some kind of notice isn't called for when -O3 and UBsan are
used together.


More information about the Gcc-bugs mailing list