Thread overview
[Issue 6871] New: expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion `0' failed
Nov 01, 2011
Leandro Lucarella
[Issue 6871] [minimal testcase] expression.c:1432: virtual dinteger_t IntegerExp::toInteger(): Assertion `0' failed
Nov 01, 2011
Leandro Lucarella
Nov 01, 2011
Leandro Lucarella
Nov 01, 2011
Leandro Lucarella
November 01, 2011
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


--- Comment #0 from Leandro Lucarella <llucax@gmail.com> 2011-11-01 04:15:25 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: -------
November 01, 2011
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


--- Comment #1 from Leandro Lucarella <llucax@gmail.com> 2011-11-01 04:21:42 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: -------
November 01, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6871



--- Comment #2 from Leandro Lucarella <llucax@gmail.com> 2011-11-01 04:22:11 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: -------
November 01, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6871


Leandro Lucarella <llucax@gmail.com> changed:

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


--- Comment #3 from Leandro Lucarella <llucax@gmail.com> 2011-11-01 04:29:45 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: -------