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

--- Comment #0 from Stewart Gordon <> 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;
- I use DMD 1.047 instead

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to