[Bug d/108877] Explicit immutable struct import internal compiler error

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 3 02:28:19 GMT 2023


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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:2583365912c8700abe1f4a23ed611acb80fac09d

commit r12-9212-g2583365912c8700abe1f4a23ed611acb80fac09d
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Mon Feb 27 20:46:18 2023 +0100

    d: Fix ICE on explicit immutable struct import [PR108877]

    Const and immutable types are built as variants of the type they are
    derived from, and TYPE_STUB_DECL is not set for these variants.

            PR d/108877

    gcc/d/ChangeLog:

            * imports.cc (ImportVisitor::visit (EnumDeclaration *)): Call
            make_import on TYPE_MAIN_VARIANT.
            (ImportVisitor::visit (AggregateDeclaration *)): Likewise.
            (ImportVisitor::visit (ClassDeclaration *)): Likewise.

    gcc/testsuite/ChangeLog:

            * gdc.dg/imports/pr108877a.d: New test.
            * gdc.dg/pr108877.d: New test.

    (cherry picked from commit ce1cea3e22f58bbddde017f8a92e59bae8892339)


More information about the Gcc-bugs mailing list