gnu/gcc/ed65c1df1dd1ffb668b48d8185d0d5d64ea6255f 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)
4 files changed