← Back to index
|
Original Bugzilla link
Bug 21652 – dmd aborts with "e: cast, cast(immutable(bool))0"
Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-02-21T10:08:04Z
Last change time
2024-12-13T19:14:50Z
Assigned to
No Owner
Creator
Berni44
Moved to GitHub: dmd#18024 →
Comments
Comment #0
by bugzilla — 2021-02-21T10:08:04Z
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@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.
Comment #1
by bugzilla — 2021-02-21T18:59:58Z
Here a reduced testcase: bool[][] a = b; static b() { int[1][1] c; return c; } produces "e: cast, cast(bool)0" Since 2.089.1
Comment #2
by robert.schadek — 2024-12-13T19:14:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/18024
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB