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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Iain Buclaw
<[email protected]>:

https://gcc.gnu.org/g:c19dda2bc6af928414788509d9be7675b93dcb03

commit r15-11134-gc19dda2bc6af928414788509d9be7675b93dcb03
Author: Iain Buclaw <[email protected]>
Date:   Tue May 5 22:00:28 2026 +0200

    d: internal compiler error: in convert_move, at expr.cc:227

    This was caused by a forward reference of a nested struct changing the
    TYPE_MODE of its enclosing struct type to be incorrectly inferred as an
    integer mode.  Fixed by setting TREE_ADDRESSABLE early, and moving the
    mode setting and propagation to finish_aggregate_mode and
    finish_aggregate_type respectively, rather than at the end of the
    visitor method for TypeStruct.

            PR d/125089

    gcc/d/ChangeLog:

            * types.cc (finish_aggregate_mode): Explicitly set TYPE_MODE of
            non-POD types here.
            (finish_aggregate_type): Propagate TREE_ADDRESSABLE to all
variants.
            (TypeVisitor::visit (TypeStruct *)): Set TREE_ADDRESSABLE before
            visiting struct members.

    gcc/testsuite/ChangeLog:

            * gdc.dg/pr125089.d: New test.

    (cherry picked from commit 2dde6c91d0f0df9ebef57955b92a6dfd30bea480)

Reply via email to