https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98277
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>: https://gcc.gnu.org/g:d0bdf3a9069f8f42b2ab196db2c4d75937722646 commit r10-9154-gd0bdf3a9069f8f42b2ab196db2c4d75937722646 Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Tue Dec 15 10:36:00 2020 +0100 d: Fix ICE in gimplify_expr, at gimplify.c (PR98277) The DMD front-end shouldn't, but can sometimes leak manifest constants in the AST passed to the code generator. To prevent this being an issue, the setting of DECL_INITIAL has been moved to the point where the CONST_DECL is used, rather than in the declaration handler. gcc/d/ChangeLog: PR d/98277 * decl.cc (DeclVisitor::visit (VarDeclaration *)): Move setting of DECL_INITIAL for manifest constants to ... (get_symbol_decl): ... here. gcc/testsuite/ChangeLog: PR d/98277 * gdc.dg/pr98277.d: New test. (cherry picked from commit 36c9a3fe3f3c200ad3937d00d339b7269cf07adb)