mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
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/import-c/pr119799.d: New test. * gdc.dg/import-c/pr119799c.c: New test.
The files in the dmd subdirectory are part of the front-end for the Digital Mars D compiler, hosted at https://github.com/dlang/dmd/. They cover the lexical analysis, parsing, and semantic analysis of the D Programming Language defined in the documents at https://dlang.org/. To report a problem or look up known issues with the dmd front-end, please visit the issue tracker at https://issues.dlang.org/. All changes to dmd should go through the upstream repository first, then merged back to GCC.