https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123376

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> ipa-free-lang-data thinks the int type is not needed and that it only needs
> const int, but doesn't mangle plugh until dwarf2out wants to emit the
> &H::plugh and at that point it ICEs because the FE during the mangling
> rightly assumes that TYPE_MAIN_VARIANT of a type doesn't have CV quals.

TYPE_MAIN_VARIANT should never have CV quals, so if FLD thinks 'int' is not
needed but 'const int' is, that should have kept the main variant used.

The issue is probably

      /* Turn the removed types into distinct types.  */
      TYPE_MAIN_VARIANT (t) = t;

so that 'const int' isn't seen as used.  I'll have a look.

Reply via email to