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

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

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

commit r12-10921-gf4b8c08c86237e7eb29defb2f8ae3bff22581e5f
Author: Iain Buclaw <ibuc...@gdcproject.org>
Date:   Mon Jan 20 20:01:03 2025 +0100

    d: Fix failing test with 32-bit compiler [PR114434]

    Since the introduction of gdc.test/runnable/test23514.d, it's exposed an
    incorrect compilation when adding a 64-bit constant to a link-time
    address.  The current cast to size_t causes a loss of precision, which
    can result in incorrect compilation.

            PR d/114434

    gcc/d/ChangeLog:

            * expr.cc (ExprVisitor::visit (PtrExp *)): Get the offset as a
            dinteger_t rather than a size_t.
            (ExprVisitor::visit (SymOffExp *)): Likewise.

    gcc/testsuite/ChangeLog:

            * gdc.test/runnable/test23514.d: New test.

    (cherry picked from commit 9ab38952a2033d6d4a8e31c3c4d2ab1a25a406c6)

Reply via email to