https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106555
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>: https://gcc.gnu.org/g:4b0253b019943abf2cc5f4db0b7ed67caedffe4a commit r13-1992-g4b0253b019943abf2cc5f4db0b7ed67caedffe4a Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Mon Aug 8 15:17:47 2022 +0200 d: Fix ICE in in add_stack_var, at cfgexpand.cc:476 The type that triggers the ICE never got completed by the semantic analysis pass. Checking for size forces it to be done, or issue a compile-time error. PR d/106555 gcc/d/ChangeLog: * d-target.cc (Target::isReturnOnStack): Check for return type size. gcc/testsuite/ChangeLog: * gdc.dg/imports/pr106555.d: New test. * gdc.dg/pr106555.d: New test.