www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6871] New: expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion `0' failed

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6871

           Summary: expression.c:1432: virtual dinteger_t
                    IntegerExp::toInteger(): Assertion `0' failed
           Product: D
           Version: D1
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: llucax gmail.com



PDT ---
This is in DMD 1.071:

$ cat t.d
void f() {
    for (int i = 0; i < x.length; i++) {
    }
}
$ dmd -c t.d
t.d(2): Error: undefined identifier x, did you mean function f?
_error_ 0x8edf468
dmd: expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion
`0' failed.
Aborted

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6871


Leandro Lucarella <llucax gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
            Summary|expression.c:1432: virtual  |[minimal testcase]
                   |dinteger_t                  |expression.c:1432: virtual
                   |IntegerExp::toInteger():    |dinteger_t
                   |Assertion `0' failed        |IntegerExp::toInteger():
                   |                            |Assertion `0' failed



PDT ---
An even simpler testcase:

void f() {
    while (x.length) {
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6871




PDT ---
BTW, compiling DMD in "debug mode" hides the assertion :S

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6871


Leandro Lucarella <llucax gmail.com> changed:

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



PDT ---
OK, it seems that only the makefile is broken, after rebuilding all DMD I can't
reproduce the bug anymore.

I guess some files weren't rebuilt after I updated the git repo and that's what
was causing the problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2011