www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 71] New: ICE with std.algorith.uniq

http://bugzilla.gdcproject.org/show_bug.cgi?id=3D71

             Bug #: 71
           Summary: ICE with std.algorith.uniq
    Classification: Unclassified
           Product: GDC
           Version: development
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
        AssignedTo: ibuclaw gdcproject.org
        ReportedBy: Marco.Leise gmx.de


With the master branch compiled against GCC 4.8.0 I currently get this outp=
ut:

  gdc -fdebug -O0 -g <=E2=80=A6>
  /opt/gdc/include/d/4.8.0/std/algorithm.d: In Elementfunktion
=C2=BBopt.CanonicalHuffman.print.UniqResult!(__lambda6, SortedRange!(Tuple!=
(ulong,
Leaf)[], __lambda3)).UniqResult.save=C2=AB:
  /opt/gdc/include/d/4.8.0/std/algorithm.d:3259: interner Compiler-Fehler: =
in
expand_expr_real_1, bei expr.c:9327

for the following code:

import std.algorithm;
import std.range;

struct Leaf
{
    ubyte symbol;
    ubyte codeLen;
}

struct CanonicalHuffman
{
    Leaf[] table;

    void print()
    {
        auto list =3D zip(iota(table.length), table.dup).array
            .sort!((a, b) =3D> a[1].symbol < b[1].symbol)
            .uniq!((a, b) =3D> (a[0] & (1 << a[1].codeLen) - 1) =3D=3D (b[0=
] & (1 <<
b[1].codeLen) - 1));
    }
}

--=20
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are watching all bug changes.=
Jul 08 2013