[Bug d/123046] d: ICE in gimplify_expr with const ref noreturn parameters
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 29 14:29:59 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123046
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:b4ee1a549eac8d165740616376beeab73c5c6512
commit r16-7144-gb4ee1a549eac8d165740616376beeab73c5c6512
Author: Iain Buclaw <ibuclaw@gdcproject.org>
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.
More information about the Gcc-bugs
mailing list