https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83388
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Compilation with -m32 and linking without? I'd expect that to fail more miserably. That said, what we are doing with the sanitizers is similar to what we are doing with debug stmts, if compilation is with -flto -g and linking without -g, then debug stmts are dropped. Likewise, IFN_*SAN* is dropped from the IL if linking without corresponding -fsanitize= options. Then there are builtins lowered earlier, those are just library calls, so it is user's responsibility to make sure the corresponding library is linked, otherwise normal linking errors should be reported.