www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17964] New: [CTFE] If array is large enough it hits __simd at

https://issues.dlang.org/show_bug.cgi?id=17964

          Issue ID: 17964
           Summary: [CTFE] If array is large enough it hits __simd at CTFE
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dmitry.olsh gmail.com

Array ops used to work at CTFE, now:

uint bug(){
    uint[] a = [1, 2, 3, 5, 6, 7];
    uint[] b = [1, 2, 3, 5, 6, 7];
    a[] |= ~b[];
    return a[1];
}

enum x = bug();

Produces on a recent master (1fa67d062b8d755b11722ea112af63cb34cc06b7):

/home/olshanskiy/dmd2/linux/bin64/../../src/druntime/import/core/internal/arrayop.d(102):
Error: __simd cannot be interpreted at compile time, because it has no
available source code
/home/olshanskiy/dmd2/linux/bin64/../../src/druntime/import/core/internal/arrayop.d-mixin-50(50):
       called from here: load(&res[pos])
/home/olshanskiy/dmd2/linux/bin64/../../src/druntime/import/core/internal/arrayop.d-mixin-50(50):
       called from here: binop(load(&res[pos]), unaop(load(&_param_1[pos])))
/home/olshanskiy/dmd2/linux/bin64/../../src/druntime/import/core/internal/arrayop.d-mixin-50(50):
       called from here: store(&res[pos], binop(load(&res[pos]),
unaop(load(&_param_1[pos]))))
bug.d(5):        called from here: arrayOp(a[], b[])
bug.d(9):        called from here: bug()

--
Nov 03