[Issue 23529] New: [ICE] Compiler segfaults on static array cast

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 1 03:18:23 UTC 2022


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

          Issue ID: 23529
           Summary: [ICE] Compiler segfaults on static array cast
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: uplink.coder at googlemail.com

Currently the compiler will segfault because of an internal null pointer which
is not checked against.

static assert(!__traits(compiles, ()
{
    char[24] x;
    int myNumber = 4;
    return cast(char[4]) (x[myNumber .. myNumber + 4]);
} ()));

--


More information about the Digitalmars-d-bugs mailing list