www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7632] New: byValue() for associative arrays doesn't return the correct values

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632

           Summary: byValue() for associative arrays doesn't return the
                    correct values
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: exetoc gmail.com



17:50:14 PST ---
This has been tested using the latest git revision.

Test case:

import std.stdio;

void main()
{
    int[int] i;
    foreach (idx; 0 .. 10)
        i[idx] = idx * 2;

    writeln(i.byValue()); // output: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    writeln(i.values); // output: [0, 8, 16, 2, 10, 18, 4, 12, 6, 14]
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 02 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632


Erik Johansson Andersson <exetoc gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3
           Severity|normal                      |minor


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh quickfur.ath.cx



Appears to have been fixed in even more latest git ;-) (2012-03-13). Please
verify.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 13 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




17:38:07 PDT ---

 Appears to have been fixed in even more latest git ;-) (2012-03-13). Please
 verify.
The output is still the same for me. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 14 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




OK I'll leave this bug open for now. I just tried it again with the latest dmd
from git, and got this output:

[0, 8, 16, 2, 10, 18, 4, 12, 6, 14]
[0, 8, 16, 2, 10, 18, 4, 12, 6, 14]

I'm also using the latest druntime & phobos from git; I wonder if the problem
is caused by a bug in older druntime or phobos. Have you tried building
druntime/phobos from git to see if it still has the same effect?

P.S. I'm also using 64-bit Linux, so unless there's some system-dependent issue
here, I'm quite surprised that we're getting different results.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




04:20:07 PDT ---

 OK I'll leave this bug open for now. I just tried it again with the latest dmd
 from git, and got this output:
 
 [0, 8, 16, 2, 10, 18, 4, 12, 6, 14]
 [0, 8, 16, 2, 10, 18, 4, 12, 6, 14]
 
 I'm also using the latest druntime & phobos from git; I wonder if the problem
 is caused by a bug in older druntime or phobos. Have you tried building
 druntime/phobos from git to see if it still has the same effect?
 
 P.S. I'm also using 64-bit Linux, so unless there's some system-dependent issue
 here, I'm quite surprised that we're getting different results.
The package installs the latest phobos and druntime as well. I've been checking the modification dates of all the files to make sure that they've been replaced with the newer ones, and I've even tried to remove everything first, before building the sources again, but the output remains the same. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 15 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com



PDT ---
Works on 2.059

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




07:51:45 PDT ---

 Works on 2.059
Still doesn't work for me for some reason. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 21 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




08:17:23 PDT ---
Are you by any chance using -m32, or something? Because this bug has been
confirmed by a 64-bit FreeBSD user, using the 2.059 release, as well as the
latest git revision.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




PDT ---
Oh, I should have precised I'm using the Win32 release. I normally do it, but I
forgot. Apologies.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




You are right, with -m32 it works, but with -m64 it shows the wrong values.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 27 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632




P.S. This is on Linux 64-bit (Debian).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 27 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
            Summary|byValue() for associative   |[64bit] byValue() for
                   |arrays doesn't return the   |associative arrays doesn't
                   |correct values              |return the correct values
           Severity|minor                       |major



Still valid. Marked as a 64bit wrong-code bug, raised severity.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 14 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7632


Don <clugdbug yahoo.com.au> changed:

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



Marking as a duplicate of bug 8583, which is a better bug report.

*** This issue has been marked as a duplicate of issue 8583 ***

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