https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110959
--- Comment #1 from CVS 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:3cf5a511e253876279462b1de08cfd8f5f804242 commit r12-9817-g3cf5a511e253876279462b1de08cfd8f5f804242 Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Tue Aug 15 16:56:42 2023 +0200 d: Fix internal compiler error: in layout_aggregate_type, at d/types.cc:574 This ICE is specific to the D front-end language version in GDC 12. PR d/110959 gcc/d/ChangeLog: * dmd/canthrow.d (Dsymbol_canThrow): Use foreachVar. * dmd/declaration.d (TupleDeclaration::needThis): Likewise. (TupleDeclaration::foreachVar): New function. (VarDeclaration::setFieldOffset): Use foreachVar. * dmd/dinterpret.d (Interpreter::visit (DeclarationExp)): Likewise. * dmd/dsymbolsem.d (DsymbolSemanticVisitor::visit (VarDeclaration)): Don't push tuple field members to the scope symbol table. (determineFields): Handle pushing tuple field members here instead. * dmd/dtoh.d (ToCppBuffer::visit (VarDeclaration)): Visit all tuple fields. (ToCppBuffer::visit (TupleDeclaration)): New function. * dmd/expression.d (expandAliasThisTuples): Use foreachVar. * dmd/foreachvar.d (VarWalker::visit (DeclarationExp)): Likewise. * dmd/ob.d (genKill): Likewise. (checkObErrors): Likewise. * dmd/semantic2.d (Semantic2Visitor::visit (TupleDeclaration)): Visit all tuple fields. gcc/testsuite/ChangeLog: * gdc.dg/pr110959.d: New test. * gdc.test/runnable/test23010.d: New test.