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

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Mon Jul 8 06:01:14 PDT 2013


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

             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 at gdcproject.org
        ReportedBy: Marco.Leise at gmx.de


With the master branch compiled against GCC 4.8.0 I currently get this output:

  gdc -fdebug -O0 -g <…>
  /opt/gdc/include/d/4.8.0/std/algorithm.d: In Elementfunktion
»opt.CanonicalHuffman.print.UniqResult!(__lambda6, SortedRange!(Tuple!(ulong,
Leaf)[], __lambda3)).UniqResult.save«:
  /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 = zip(iota(table.length), table.dup).array
            .sort!((a, b) => a[1].symbol < b[1].symbol)
            .uniq!((a, b) => (a[0] & (1 << a[1].codeLen) - 1) == (b[0] & (1 <<
b[1].codeLen) - 1));
    }
}

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the D.gnu mailing list