https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106334
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:0f129766fdb687394f0eea04f69268b5cc034cda commit r13-1742-g0f129766fdb687394f0eea04f69268b5cc034cda Author: Richard Biener <rguent...@suse.de> Date: Tue Jul 19 10:02:40 2022 +0200 lto/106334 - relax assert during WPA tree merging The dwarf2out map of tree to symbol + offset is populated too early when streaming in trees so that when WPA tree merging decides to recycle them the mapping prevails and if we are unlucky the same address is used for another tree with a symbol + offset DIE to record. The following mitigates the resulting ICE by relaxing the assert, allowing re-use of a slot during WPA. Delaying the register would be better but it's already somewhat hairy and uglifying this further doesn't look too important right now. PR lto/106334 * dwarf2out.cc (dwarf2out_register_external_die): Allow map entry re-use during WPA.