https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63888
--- Comment #11 from Yury Gribov <y.gribov at samsung dot com> --- (In reply to Jakub Jelinek from comment #9) > An ODR violation is IMHO something different, it is the case where you have > the same symbol name (but, you'd need to distinguish between globally > visible symbols that should be ODR checked and local symbols and/or symbols > from languages you don't want to check for it) registered multiple times for > multiple addresses. So you'd need to hash based on the symbol name if > marked for ODR checking, and check if the same (non-comdat) global isn't > registered several times. There is already proposal to this in UBSan: http://llvm.org/bugs/show_bug.cgi?id=21498