https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97553
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- 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.