https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119799
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Iain Buclaw <[email protected]>: https://gcc.gnu.org/g:7cd6ed0768932b7776c41c70ca0145d6b8c17cc4 commit r13-10062-g7cd6ed0768932b7776c41c70ca0145d6b8c17cc4 Author: Iain Buclaw <[email protected]> Date: Wed Jan 28 23:51:35 2026 +0100 d: Fix internal compiler error: in visit, at d/decl.cc:838 [PR119799] This was caused by a check in the D front-end disallowing static VAR_DECLs with a size `0'. While empty structs in D are give the size `1', the same symbol coming from ImportC modules do infact have no size, so allow C variables to pass the check as well as array objects. PR d/119799 gcc/d/ChangeLog: * decl.cc (DeclVisitor::visit (VarDeclaration *)): Check front-end type size before building the VAR_DECL. Allow C symbols to have a size of `0'. gcc/testsuite/ChangeLog: * gdc.dg/torture/pr119799.d: New test. * gdc.dg/torture/imports/pr119799c.c: New test. (cherry picked from commit 074b2b0f91f948fe3488ada91ec6a8576c684dea)
