[Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112718 --- Comment #3 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:7218f5050cb7163edae331f54ca163248ab48bfa commit r14-8345-g7218f5050cb7163edae331f54ca163248ab48bfa Author: Richard Biener Date: Mon Jan 22 15:42:59 2024 +0100 debug/112718 - reset all type units with -ffat-lto-objects When mixing -flto, -ffat-lto-objects and -fdebug-type-section we fail to reset all type units after early output resulting in an ICE when attempting to add then duplicate sibling attributes. PR debug/112718 * dwarf2out.cc (dwarf2out_finish): Reset all type units for the fat part of an LTO compile. * gcc.dg/debug/pr112718.c: New testcase.
[Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112718 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener --- I have a patch, but other issues with -fdebug-types-section and -flto will prevail.
[Bug debug/112718] [11/12/13/14 Regression] ICE: in add_dwarf_attr, at dwarf2out.cc:4501 with -g -fdebug-types-section -flto -ffat-lto-objects
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112718 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Summary|[11/12/13/14 Regression]|[11/12/13/14 Regression] |ICE: in add_dwarf_attr, at |ICE: in add_dwarf_attr, at |dwarf2out.cc:4501 with -g |dwarf2out.cc:4501 with -g |-fdebug-types-section -flto |-fdebug-types-section -flto |-fno-use-linker-plugin |-ffat-lto-objects Ever confirmed|0 |1 Last reconfirmed||2023-11-27 Target Milestone|--- |11.5 --- Comment #1 from Richard Biener --- Confirmed. Same with -g -fdebug-types-section -flto -ffat-lto-objects Note -fdebug-types-section has known issues with LTO, it shouldn't be used. In fact I asked whether we can remove it ... I think I've seen this particular bug before as well.