Summary: [CTFE] Foreach on semantically wrong initialized array
                    crashes the compiler
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-06-09 16:10:04 PDT ---
The following (invalid) code segfaults DMD (2.053).

enum qux = foo();

int[] bar = [[]*[[]<>[]]*[]]; // can be anything that is not an int[]

int foo(){
    return 0;

void main(){}

It does not matter what the initializer of bar is at long as it is not an
The segmentation fault still occurs if bar is set to immutable.

Compilation output:
Error: static variable bar cannot be read at compile time
Segmentation fault

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to