www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20958] New: dmd crash in glue layer

https://issues.dlang.org/show_bug.cgi?id=20958

          Issue ID: 20958
           Summary: dmd crash in glue layer
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

% 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.

--
Jun 19 2020