Don <> changed:

           What    |Removed                     |Added
                 CC|                            |
            Summary|Cast of float function      |[DMC too] Cast of float
                   |return to ulong or uint     |function return to ulong or
                   |gives bogus value           |uint gives bogus value
           Severity|major                       |critical

--- Comment #3 from Don <>  2009-08-01 03:04:42 PDT ---
This code below fails on DMC, proving that this is a severe back-end bug.
Interesting on DMC, the uint case does NOT fail: it inlines in that case.
Raising severity, as I believe this is one of the worse extant compiler bugs.

What's happening is that a function _DBLULNG@ is being used to convert from
double to ulong. It expects a double, but it's being given a float. So garbage

#include <assert.h>
float getFloat() {
    return 5.0f;

int main()
   unsigned long j = (unsigned long)getFloat();
   return 0;

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

Reply via email to