[Issue 14207] New: Assertion failure: '(vd->storage_class & (STCout | STCref)) ? isCtfeReferenceValid(newval) : isCtfeValueValid(newval)' on line 6724 in file 'interpret.c'

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 20 05:01:18 PST 2015


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

          Issue ID: 14207
           Summary: Assertion failure: '(vd->storage_class & (STCout |
                    STCref)) ? isCtfeReferenceValid(newval) :
                    isCtfeValueValid(newval)' on line 6724 in file
                    'interpret.c'
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: electrolysis.jp+d at gmail.com

test.d:
---
import std.digest.sha;
enum h = digest!SHA1("abc");  // I'm not interested in whether this is valid
---

DMD 2.067.0-b2 dies with:

Assertion failure: '(vd->storage_class & (STCout | STCref)) ?
isCtfeReferenceValid(newval) : isCtfeValueValid(newval)' on line 6724 in file
'interpret.c'


On the other hand, DMD 2.066.1 throws:

D:\d\dmd2\windows\bin\..\..\src\phobos\std\digest\sha.d(757): Error: cannot
cast ubyte[8] to const(ubyte)[]
D:\d\dmd2\windows\bin\..\..\src\phobos\std\digest\sha.d(765):        called
from here: this.put(cast(const(ubyte)[])bits)
D:\d\dmd2\windows\bin\..\..\src\phobos\std\digest\digest.d(435):        called
from here: hash.finish()
test.d(2):        called from here: digest("abc")

--


More information about the Digitalmars-d-bugs mailing list