www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7771] New: [ICE][CTFE] With maketrans and string slicing

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

           Summary: [ICE][CTFE] With maketrans and string slicing
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.ascii: letters, uppercase;
import std.string: maketrans;
immutable r = maketrans(uppercase, uppercase[13 .. $] ~ uppercase[0 .. 13]);
void main() {}


DMD 2.059head:

Assertion failure: '!v->isDataseg() || v->isCTFE()' on line 108 in file
'interpret.c'


With small changes it crashes in another point:


import std.string: maketrans;
void main() {
    immutable s = "foo";
    static r = maketrans(s, s[0 .. $]);
}


DMD 2.059head:

Assertion failure: 'v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack <
stackPointer()' on line 97 in file 'interpret.c'

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


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE



Patch for bug 7770 fixes this.

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

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