ldc executable crashes with this code

forkit forkit at gmail.com
Wed Feb 2 23:21:52 UTC 2022

Any reason why compiling this with ldc would cause the exe to 

Compiling with DMD (using either declaration of palindrome works 
just fine though)

// ----

module test;

import std;

void main()
     char[] palindrome = cast(char[])"able was I ere I saw elba";

    //char[] palindrome = 


     // note: The line below causes the exe to crash when compiled 
with ldc
     // but only if using the first version of palindrome.


// ---

More information about the Digitalmars-d-learn mailing list