[Issue 9938] New: ICE using global interface variable in CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 16 04:57:32 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9938
Summary: ICE using global interface variable in CTFE
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2013-04-16 04:57:31 PDT ---
The new tests for CTFE class variables cause an assert failure if run at
compile time.
dmd: interpret.c:164: Expression* CtfeStack::getValue(VarDeclaration*):
Assertion `v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack < globalValues.dim'
failed.
Aborted
======
diff --git a/test/runnable/interpret.d b/test/runnable/interpret.d
index 38735e6..53fbe1f 100644
--- a/test/runnable/interpret.d
+++ b/test/runnable/interpret.d
@@ -2871,7 +2871,7 @@ const ITest105a t105ia = new Test105b('E', 88, 'A', 99);
__gshared Test105b t105gs = new Test105b('E', 88, 'A', 99);
shared Test105b t105bs = new shared(Test105b)('E', 88, 'A', 99);
immutable Test105b t105bi = new immutable(Test105b)('E', 88, 'A', 99);
-void test105()
+bool test105()
{
assert(t105b.a == 'A');
assert(t105b.b == 99);
@@ -2920,9 +2920,11 @@ void test105()
assert(t105bi.f == 88);
assert(t105bi.test105a() == "test105a");
assert(t105bi.test105b() == "test105b");
-
+ return true;
}
+static assert(test105());
+
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list