www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20630] New: Illegal instruction: when passing enum:string to


          Issue ID: 20630
           Summary: Illegal instruction: when passing enum:string to
                    function taking a dstring
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: puremagic zoadian.de

import std.stdio;

struct VariableDefinition {
        string lex;

enum LOCALVARS = [


void foo(dstring s) {

void main(string[] args) {  

this results in Illegal instruction (core dumped)

with DMD 2.090.1 and DMD Beta 2.091.0-beta.1

interestingly ldc2 1.19.0 reports the correct error

Mar 03 2020