[Bug c++/123376] [16 Regression] ICE in write_type when building qt6-qtscxml with -flto -ffat-lto-objects since r16-3821
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 27 15:00:24 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123376
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:b227c79c4331acdf1f1928b7a01ba3c03e00e6cb
commit r16-7070-gb227c79c4331acdf1f1928b7a01ba3c03e00e6cb
Author: Richard Biener <rguenther@suse.de>
Date: Tue Jan 27 11:29:27 2026 +0100
debug/123376 - mangle decls referenced in initializers early
The following makes sure to mangle decls referenced in initializers,
even when of aggregate type, during the early debug phase since
later we eventually leave stray supposedly unused CV qualified
types as their own main variant which confuses C++ mangling. The
comment that refers to rtl_for_decl_init punting might be
accurate, but loc_list_from_tree_1 will happily see to
cst_pool_loc_descr where constant pool lookup will eventually
create DECL_RTL of referenced symbols, triggering mangling.
PR debug/123376
* dwarf2out.cc (tree_add_const_value_attribute): Walk all
initializers for early mangling of referenced decls.
(mangle_referenced_decls): Also walk subtrees of CONSTRUCTORS.
* g++.dg/lto/pr123376_0.C: New testcase.
More information about the Gcc-bugs
mailing list