https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114501
--- Comment #13 from GCC 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:fdd95e1cf29137a19baed25f8c817d320dfe63e3 commit r15-7861-gfdd95e1cf29137a19baed25f8c817d320dfe63e3 Author: Richard Biener <rguent...@suse.de> Date: Thu Mar 6 13:48:16 2025 +0100 lto/114501 - missed free-lang-data for CONSTRUCTOR index The following makes sure to also walk CONSTRUCTOR element indexes which can be FIELD_DECLs, referencing otherwise unused types we need to clean. walk_tree only walks CONSTRUCTOR element data. PR lto/114501 * ipa-free-lang-data.cc (find_decls_types_r): Explicitly handle CONSTRUCTORs as walk_tree handling of those is incomplete. * g++.dg/pr114501_0.C: New testcase.