Thread overview
[Issue 3315] New: ICE(mtype.c) floating point converted to an integer type and passed to a function, when certain incompatible overloads exist
Sep 12, 2009
Stewart Gordon
Sep 13, 2009
Don
Sep 15, 2009
Don
Oct 06, 2009
Don
September 12, 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@puremagic.com
        ReportedBy: smjg@iname.com


--- Comment #0 from Stewart Gordon <smjg@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: -------
September 13, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3315


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #1 from Don <clugdbug@yahoo.com.au> 2009-09-13 03:33:55 PDT ---
This is probably the same as the nasty regression bug 3173. I'd submitted the patch to Walter just before 2.032 was released, but unfortunately it missed the deadline. We considered delaying the release of 2.032 by another few days because of it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 15, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3315


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
           Severity|normal                      |regression


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2009-09-14 23:56:19 PDT ---
This is a regression. My patch for bug 3173 fixes it. It's not the same as bug 3173, since this is an ice-on-valid-code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 06, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3315


Don <clugdbug@yahoo.com.au> changed:

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


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2009-10-06 02:54:32 PDT ---
Fixed DMD2.033.

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