http://d.puremagic.com/issues/show_bug.cgi?id=6418

           Summary: [CTFE] segfault on SortedRange.equalRange
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dmitry.o...@gmail.com


--- Comment #0 from Dmitry Olshansky <dmitry.o...@gmail.com> 2011-07-31 
11:16:16 PDT ---
Test case:

import std.range;

enum table = [2, 3, 5, 7, 11];

uint lookup(uint k)
{
        auto tab = assumeSorted(table);
        tab.equalRange(k);  //changing it to lowerBound works
        assert(!tab.empty);
        return 42;
}
enum t = lookup(7);

invking dmd:
dmd2/linux/bin/../../src/phobos/std/range.d(5572): Error: cannot evaluate
this.length() at compile time
dmd2/linux/bin/../../src/phobos/std/range.d(5620): Error: cannot evaluate
this.getTransitionIndex(v) at compile time
dmd2/linux/bin/../../src/phobos/std/range.d(5620): Error: cannot evaluate
this.opSlice(0LU,this.getTransitionIndex(v)) at compile time
dmd2/linux/bin/../../src/phobos/std/range.d(5693): Error: cannot evaluate
this.opSlice(first,it).lowerBound(value) at compile time
Segmentation fault (core dumped)

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

Reply via email to