Thread overview
[Issue 5649] New: std.conv.parse faulty for floating point with -O -m32
Feb 24, 2011
Ali Cehreli
Feb 24, 2011
David Simcha
Feb 24, 2011
David Simcha
Feb 24, 2011
Don
Mar 04, 2013
Don
February 24, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5649

           Summary: std.conv.parse faulty for floating point with -O -m32
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: acehreli@yahoo.com


--- Comment #0 from Ali Cehreli <acehreli@yahoo.com> 2011-02-23 20:33:02 PST ---
The following assert fails when compiled with dmd's command line options -O -m32:

import std.conv;

void main()
{
    char[] input = "1.5e3".dup;
    assert(1500 == parse!double(input));  // <-- FAILS
}

It fails for float and real as well.

Please note that this combination works: -O -m64

Ali

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 24, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5649


David Simcha <dsimcha@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsimcha@yahoo.com
           Platform|x86_64                      |x86


--- Comment #1 from David Simcha <dsimcha@yahoo.com> 2011-02-24 06:24:18 PST ---
Under platform, please put x86 if it's a 32-bit bug, even if you ran the code on a 64-bit machine.

I can also reproduce this on Windows.  Note that the answer is correct if -release is also enabled.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 24, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5649


David Simcha <dsimcha@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
           Severity|major                       |regression


--- Comment #2 from David Simcha <dsimcha@yahoo.com> 2011-02-24 06:53:15 PST ---
This one was introduced in DMD 2.048 -> it's a regression.  Also, since optimization settings affect the result, I think it's safe to call this a wrong-code bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 24, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5649


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2011-02-24 09:14:29 PST ---
This was fixed a couple of days ago.

https://github.com/D-Programming-Language/dmd/commit/597d233d1111a0d81382db265df07ba15bff1b0c

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5649


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pabuond@gmail.com


--- Comment #4 from Don <clugdbug@yahoo.com.au> 2013-03-04 01:50:49 PST ---
*** Issue 8120 has been marked as a duplicate of this issue. ***

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