[Bug sanitizer/104934] -fsanitize=undefined codegen err
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 15 13:32:25 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104934
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And the bug is?
The S class doesn't have the key method defined, so some other TU needs to
define it and thus provide the vtable and rtti for it.
Without -fsanitize=vptr the typeinfo isn't needed on this particular testcase
and the vtable isn't needed either, which is why you don't get an undefined
symbol in that case and you get it with -fsanitize=vptr or -fsanitize=undefined
that implies that.
More information about the Gcc-bugs
mailing list