https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106555
--- Comment #2 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:fc7166a7c409bf231d5f243636f30904deea6e6f commit r12-8671-gfc7166a7c409bf231d5f243636f30904deea6e6f 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. (cherry picked from commit 4b0253b019943abf2cc5f4db0b7ed67caedffe4a)