[Bug d/123419] d: internal compiler error: in visit, at d/expr.cc:2224

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 28 22:44:21 GMT 2026


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

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

https://gcc.gnu.org/g:9da809aa4caa4f369094b1b0818c9919bf1e95e7

commit r13-10061-g9da809aa4caa4f369094b1b0818c9919bf1e95e7
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Wed Jan 28 23:06:23 2026 +0100

    d: Fix ICE in ExprVisitor::visit, at d/expr.cc:2224 [PR123419]

    The original assert expected the type of `__traits(initSymbol)' to be
    exactly `const(void[])', but because D strips const from arrays to allow
    passing slices as mutable ranges to template functions, so it got turned
    into `const(void)[]'.

            PR d/123419

    gcc/d/ChangeLog:

            * expr.cc (ExprVisitor::visit (VarExp *)): Adjust assertion.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit ddf94524f9accb47c1fc59191739ec34c5907eb8)


More information about the Gcc-bugs mailing list