www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5649] New: std.conv.parse faulty for floating point with -O -m32

reply d-bugmail puremagic.com writes:
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



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: -------
Feb 23 2011
next sibling parent d-bugmail puremagic.com writes:
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



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: -------
Feb 24 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
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



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: -------
Feb 24 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
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



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: -------
Feb 24 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5649


Don <clugdbug yahoo.com.au> changed:

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



*** 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: -------
Mar 04 2013