www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1743] New: interpret.c:1421 assertion failure on CTFE code

reply d-bugmail puremagic.com writes:
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)


-- 
Dec 19 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1743






-------
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


-- 
Dec 19 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1743






-------
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.


-- 
Dec 20 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1743


bugzilla digitalmars.com changed:

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





Fixed dmd 1.025 and 2.009


-- 
Jan 02 2008