[Issue 3315] New: ICE(mtype.c) floating point converted to an integer type and passed to a function, when certain incompatible overloads exist

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 12 15:17:30 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3315

           Summary: ICE(mtype.c) floating point converted to an integer
                    type and passed to a function, when certain
                    incompatible overloads exist
           Product: D
           Version: 2.032
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code, ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: smjg at iname.com


--- Comment #0 from Stewart Gordon <smjg at iname.com> 2009-09-12 15:17:29 PDT ---
void qwert(int yuiop, int asdfg) {}
void qwert(long yuiop) {}

void hjkl(real zxcvb) {
    qwert(cast(long) zxcvb);
}
----------
Assertion failure: '0' on line 1566 in file 'mtype.c'

abnormal program termination
----------

Same ICE if:
(a) line 1 is instead
    void qwert(short yuiop, short asdfg) {}
(b) in addition to (a), asdfg is cast to an int instead
(c) line 2 is removed (hence ice-on-invalid-code)

Compiles successfully if:
- line 1 is removed
- cast is changed to int, but function sigs kept the same
- line 1 parameters changed to long
- hjkl is instead
    void hjkl(real zxcvb) {
        long nm = cast(long) zxcvb;
        qwert(nm);
    }
- I use DMD 1.047 instead

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