Bug 20958 – incomplete semantic analysis when generating code for function

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-19T10:44:19Z
Last change time
2020-06-25T10:01:27Z
Keywords
ice, ice-on-valid-code, industry, pull
Assigned to
No Owner
Creator
John Colvin
See also
https://issues.dlang.org/show_bug.cgi?id=16214

Comments

Comment #0 by john.loughran.colvin — 2020-06-19T10:44:19Z
% cat K.d import U; % cat U.d struct W() { int[] J; } typeof(typeid(W!())) OB; % dmd K.d --- ERROR: This is a compiler bug. Please report it via https://issues.dlang.org/enter_bug.cgi with, preferably, a reduced, reproducible example and the information below. DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction. --- DMD v2.092.1-358-g2b0ce2768 predefs DigitalMars Posix linux ELFv1 CRuntime_Glibc CppRuntime_Gcc LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat binary /home/john/Git/dmd/generated/linux/debug/64/dmd version v2.092.1-358-g2b0ce2768 config /home/john/Git/dmd/generated/linux/debug/64/dmd.conf DFLAGS -I/home/john/Git/dmd/generated/linux/debug/64/../../../../../druntime/import -I/home/john/Git/dmd/generated/linux/debug/64/../../../../../phobos -L-L/home/john/Git/dmd/generated/linux/debug/64/../../../../../phobos/generated/linux/debug/64 -L--export-dynamic -fPIC --- core.exception.AssertError@dmd/glue.d(760): Assertion failure ---------------- ??:? _d_assertp [0x556d6c6f65ed] dmd/glue.d:760 _Z25FuncDeclaration_toObjFileP15FuncDeclarationb [0x556d6c5ee3d3] dmd/toobj.d:310 _ZN9toObjFile9ToObjFile5visitEP15FuncDeclaration [0x556d6c5fdba8] dmd/func.d:2564 _ZN15FuncDeclaration6acceptEP7Visitor [0x556d6c513881] dmd/toobj.d:1027 _Z9toObjFileP7Dsymbolb [0x556d6c5fdb0e] dmd/todt.d:1222 _ZN17TypeInfoDtVisitor5visitEP25TypeInfoStructDeclaration [0x556d6c5f4210] dmd/declaration.d:1777 _ZN25TypeInfoStructDeclaration6acceptEP7Visitor [0x556d6c4606ed] dmd/todt.d:1410 _Z13TypeInfo_toDtR9DtBuilderP19TypeInfoDeclaration [0x556d6c5f4c1d] dmd/toobj.d:706 _ZN9toObjFile9ToObjFile5visitEP19TypeInfoDeclaration [0x556d6c5fe8d3] dmd/visitor.d:47 _ZN7Visitor5visitEP25TypeInfoStructDeclaration [0x556d6c5e78d9] dmd/declaration.d:1777 _ZN25TypeInfoStructDeclaration6acceptEP7Visitor [0x556d6c4606ed] dmd/toobj.d:1027 _Z9toObjFileP7Dsymbolb [0x556d6c5fdb0e] dmd/glue.d:389 _Z10genObjFileP6Moduleb [0x556d6c5edb67] dmd/mars.d:713 int dmd.mars.tryMain(ulong, const(char)**, ref dmd.globals.Param) [0x556d6c56b57e] dmd/mars.d:952 _Dmain [0x556d6c56c4f7] This bug aflicts all dmd versions I tried, including recent master and stable.
Comment #1 by moonlightsentinel — 2020-06-19T12:12:03Z
Comment #2 by dlang-bot — 2020-06-25T08:24:13Z
@WalterBright created dlang/dmd pull request #11323 "fix Issue 20958 - incomplete semantic analysis when generating code f…" fixing this issue: - fix Issue 20958 - incomplete semantic analysis when generating code for function https://github.com/dlang/dmd/pull/11323
Comment #3 by dlang-bot — 2020-06-25T10:01:27Z
dlang/dmd pull request #11323 "fix Issue 20958 - incomplete semantic analysis when generating code f…" was merged into master: - ad474a725bad36e0a51181f499b41eb3af4291a7 by Walter Bright: fix Issue 20958 - incomplete semantic analysis when generating code for function https://github.com/dlang/dmd/pull/11323