[Issue 14207] [REG2.065] 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
Wed Apr 1 19:28:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14207
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
Hardware|x86 |All
Summary|Assertion failure: |[REG2.065] Assertion
|'(vd->storage_class & |failure:
|(STCout | STCref)) ? |'(vd->storage_class &
|isCtfeReferenceValid(newval |(STCout | STCref)) ?
|) : |isCtfeReferenceValid(newval
|isCtfeValueValid(newval)' |) :
|on line 6724 in file |isCtfeValueValid(newval)'
|'interpret.c' |on line 6724 in file
| |'interpret.c'
OS|Windows |All
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
This is a regression from 2.065, introduced by the pull request:
https://github.com/D-Programming-Language/dmd/pull/2612
And in 2.067, my CTFE interpreter improvement changed the appearance of the
issue.
Reduced case:
ubyte[8] nativeToBigEndian()
{
immutable ulong res = 1;
return *cast(ubyte[8]*) &res;
}
auto digest()
{
ubyte[8] bits = nativeToBigEndian();
return bits;
}
// With 2.064, CTFE makes errors, but with 2.065 or later, it's silently
accepted.
enum h = digest();
void main()
{
// With 2.065 or later, following code makes ICE in 'expression.c'
//pragma(msg, h);
// With 2.065 or later, following code makes ICE in 'expression.c' or
'e2ir.c'
import std.stdio;
auto a = h;
writeln(a);
}
Compiler fix:
https://github.com/D-Programming-Language/dmd/pull/4545
--
More information about the Digitalmars-d-bugs
mailing list