https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107597
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|marxin at gcc dot gnu.org |unassigned at gcc dot gnu.org Status|ASSIGNED |NEW --- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- > So this is kind of feature. How the ODR violations are detected? > I wonder if keeping weak flag disturbs something. ASAN emits so-called ODR indicators for all global symbols that survive the following check: asan_needs_odr_indicator_p (tree decl) in asan.cc:3216 And that's we see 2 of them: marxin@marxinbox:~/Programming/testcases/PR107597> nm libTest1.so | grep odr 00000000000040c0 B __odr_asan._ZN12NonTemplated1xE marxin@marxinbox:~/Programming/testcases/PR107597> nm libTest2.so | grep odr 00000000000040c0 B __odr_asan._ZN12NonTemplated1xE which eventually ends up with the run-time error.