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

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

https://gcc.gnu.org/g:3b8cbb677bfa51c550c0f98210c39fac9fb6a19b

commit r14-12280-g3b8cbb677bfa51c550c0f98210c39fac9fb6a19b
Author: Iain Buclaw <[email protected]>
Date:   Thu Jan 29 14:06:14 2026 +0100

    d: Fix ICE in gimplify_expr with const ref noreturn parameters [PR123046]

    The ICE was caused by references to const/immutable qualified `noreturn'
    declarations that were being leaked to the code generation when they
    should have been omitted or replaced with `assert(0)'.

            PR d/123046

    gcc/d/ChangeLog:

            * d-codegen.cc (build_address): Return `null' when generating the
            address of a `noreturn' declaration.
            (d_build_call): Compare TYPE_MAIN_VARIANT of type with `noreturn'.
            * decl.cc (get_fndecl_arguments): Likewise.
            * types.cc (finish_aggregate_mode): Likewise.
            (TypeVisitor::visit (TypeFunction *)): Likewise.

    gcc/testsuite/ChangeLog:

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

    (cherry picked from commit b4ee1a549eac8d165740616376beeab73c5c6512)

Reply via email to