[Issue 10949] New: CTFE ICE after indexing error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 1 23:21:04 PDT 2013


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

           Summary: CTFE ICE after indexing error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at yahoo.com.au> 2013-09-01 23:21:02 PDT ---
In the compiler, any call to optimize() may create an ErrorExp, if an array
bounds error occurs. This error is currently not propagated by any of the
optimize() functions. If this optimized expression is passed to CTFE, the CTFE
check for AST validity will fail.

Here's a single static assert which tests 14 cases.

int global;
static assert((((((([5,5][3] + global -
global)*global/global%global)>>global)&global|global)^global) == 9, [2,3][17])
|| ([3,3,3][9] is 4) && ([[1,2,3]][4]).length);

-- 
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