[Issue 21652] New: dmd aborts with "e: cast, cast(immutable(bool))0"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 21 10:08:04 UTC 2021


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

          Issue ID: 21652
           Summary: dmd aborts with "e: cast, cast(immutable(bool))0"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at bernis-buecher.de

Using the latest dmd on an old program I got the error message "e: cast,
cast(immutable(bool))0" and the following:

DMD v2.095.0-121-g01c7e0aac
predefs   slang DigitalMars Posix linux ELFv1 CRuntime_Glibc CppRuntime_Gcc
LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC
unittest assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary    ../../../Repo/dmd/generated/linux/release/64/dmd
version   v2.095.0-121-g01c7e0aac
config    ../../../Repo/dmd/generated/linux/release/64/dmd.conf
DFLAGS   
-I../../../Repo/dmd/generated/linux/release/64/../../../../../druntime/import
-I../../../Repo/dmd/generated/linux/release/64/../../../../../phobos
-L-L../../../Repo/dmd/generated/linux/release/64/../../../../../phobos/generated/linux/release/64
-L--export-dynamic -fPIC
---
core.exception.AssertError at src/dmd/dinterpret.d(6797): Assertion failure
----------------
??:? _d_assertp [0x559089f150bd]
src/dmd/dinterpret.d:6797 dmd.expression.Expression
dmd.dinterpret.copyRegionExp(dmd.expression.Expression) [0x559089c6eadb]
src/dmd/dinterpret.d:6728 dmd.expression.Expression
dmd.dinterpret.copyRegionExp(dmd.expression.Expression) [0x559089c6e938]
src/dmd/dinterpret.d:6728 dmd.expression.Expression
dmd.dinterpret.copyRegionExp(dmd.expression.Expression) [0x559089c6e938]
src/dmd/dinterpret.d:94 dmd.expression.Expression
dmd.dinterpret.ctfeInterpret(dmd.expression.Expression) [0x559089c5aa09]
src/dmd/expression.d:1647 _ZN10Expression13ctfeInterpretEv [0x559089d042f4]
src/dmd/initsem.d:535 dmd.init.Initializer
dmd.initsem.initializerSemantic(dmd.init.Initializer, dmd.dscope.Scope*,
dmd.mtype.Type, dmd.init.NeedInterpret).visitExp(dmd.init.ExpInitializer)
[0x559089d55ddc]
src/dmd/initsem.d:548
_Z19initializerSemanticP11InitializerP5ScopeP4Type13NeedInterpret
[0x559089d53ede]
src/dmd/semantic2.d:261 _ZN16Semantic2Visitor5visitEP14VarDeclaration
[0x559089da4215]
src/dmd/declaration.d:1633 _ZN14VarDeclaration6acceptEP7Visitor
[0x559089c57085]
src/dmd/semantic2.d:78 _Z9semantic2P7DsymbolP5Scope [0x559089da3ab5]
src/dmd/semantic2.d:511 _ZN16Semantic2Visitor5visitEP17AttribDeclaration
[0x559089da4d1c]
src/dmd/parsetimevisitor.d:76
_ZN16ParseTimeVisitorI10ASTCodegenE5visitEP21VisibilityDeclaration
[0x559089da0d3a]
src/dmd/attrib.d:684 _ZN21VisibilityDeclaration6acceptEP7Visitor
[0x559089c1df41]
src/dmd/semantic2.d:78 _Z9semantic2P7DsymbolP5Scope [0x559089da3ab5]
src/dmd/semantic2.d:602 _ZN16Semantic2Visitor5visitEP20AggregateDeclaration
[0x559089da5010]
src/dmd/semantic2.d:660 _ZN16Semantic2Visitor5visitEP16ClassDeclaration
[0x559089da5084]
src/dmd/dclass.d:993 _ZN16ClassDeclaration6acceptEP7Visitor [0x559089c53639]
src/dmd/semantic2.d:78 _Z9semantic2P7DsymbolP5Scope [0x559089da3ab5]
src/dmd/semantic2.d:339 _ZN16Semantic2Visitor5visitEP6Module [0x559089da459d]
src/dmd/dmodule.d:1498 _ZN6Module6acceptEP7Visitor [0x559089c78e71]
src/dmd/semantic2.d:78 _Z9semantic2P7DsymbolP5Scope [0x559089da3ab5]
src/dmd/mars.d:594 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x559089c06e83]
src/dmd/mars.d:1005 _Dmain [0x559089c0878c]


Currently I have not the time to run dustmite on this. Will provide this later.

--


More information about the Digitalmars-d-bugs mailing list