Thread overview
[Issue 1743] New: interpret.c:1421 assertion failure on CTFE code
Dec 20, 2007
d-bugmail
Dec 20, 2007
d-bugmail
Dec 20, 2007
d-bugmail
Jan 03, 2008
d-bugmail
December 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1743

           Summary: interpret.c:1421 assertion failure on CTFE code
           Product: D
           Version: 1.024
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: daniel.keep+d.puremagic.com@gmail.com


When the attached source file is compiled with DMD 1.024 on Windows XP, the compiler generates the following output:

Assertion failure: 'v' on line 1421 in file 'interpret.c'

abnormal program termination

Sorry the test case is so large; it's very, very difficult to cut down CTFE examples when it's almost impossible to tell why something is or is not evaluable at compile-time (hint, hint! :P)


-- 

December 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1743





------- Comment #1 from daniel.keep+d.puremagic.com@gmail.com  2007-12-19 20:52 -------
Created an attachment (id=217)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=217&action=view)
Causes assertion failure

Compiled with the following:

dmd cr_test


-- 

December 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1743





------- Comment #2 from matti.niemenmaa+dbugzilla@iki.fi  2007-12-20 04:16 -------
Brought it down to the following:

struct PR
{
}
int crRegister_ctfe()
{
        PR pr;
        pr = PR();
        return 0;
}
const i = crRegister_ctfe();

The problem appears to be assigning a struct literal to an already-declared variable. "PR pr = PR();" works fine.


-- 

January 03, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1743


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from bugzilla@digitalmars.com  2008-01-02 19:47 -------
Fixed dmd 1.025 and 2.009


--