https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101292
--- Comment #5 from David Binderman <dcb314 at hotmail dot com> --- I tried out the C++ testsuite and there are dozens of duplicates. First four are ./g++.dg/abi/mangle36.C ./g++.dg/abi/mangle40.C ./g++.dg/asan/asan_test.cc ./g++.dg/asan/pr81021.C It looks like only -O1 is needed. $ /home/dcb/gcc/results.20211014.valgrind/bin/g++ -c -O1 ./g++.dg/abi/mangle36.C ==2656305== Invalid read of size 4 ==2656305== at 0x11AE4E0: put (hash-map.h:179) ==2656305== by 0x11AE4E0: copy_warning<tree_node*, const tree_node*> (warn ing-control.cc:209) ==2656305== by 0x11AE4E0: copy_warning(tree_node*, tree_node const*) (warn ing-control.cc:228) ==2656305== by 0x6FEE17: cp_fold(tree_node*) (cp-gimplify.c:2778)