[Issue 7785] [CTFE] ICE when slicing pointer to variable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 30 06:11:54 PDT 2012


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE, pull
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-03-30 06:12:23 PDT ---
It also applies to indexing, and assignment to slices and indices:


    int val = 7;
    auto p = &val;
    auto ary = p[0 .. 1]; // ICE 1
    auto x = p[0];        // ICE 2
    p[0..1] = 1;          // ICE 3
    p[0] = 6;             // ICE 4

This pull request turns ICE 1 and ICE 3 into sensible error messages;
ICE 2 compiles without error (it only generates an error, if index is non-zero)
ICE 4 generates a "not yet implemented" error.

https://github.com/D-Programming-Language/dmd/pull/851

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


More information about the Digitalmars-d-bugs mailing list