www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14570] New: Compiler crash relating to extern(C++)


          Issue ID: 14570
           Summary: Compiler crash relating to extern(C++)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: turkeyman gmail.com

struct X
  __gshared immutable(int)[4] s;

Emits the error:

2>Error: Internal Compiler Error: shared or immutable types can not be mapped
to C++ (immutable(int[5]))
2>Assertion failure: '0' on line 947 in file 'cppmangle.c'

And then crashes with popup "abnormal program termination"

Error is reasonable, but shouldn't crash.

May 10 2015