www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22276] New: Compiler crash for extern(C++) under Windows


          Issue ID: 22276
           Summary: Compiler crash for extern(C++) under Windows
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: tim.dlang t-online.de

The following code results in a compiler crash with dmd 2.097.2 for Windows
(tested under wine), but compiles sucessfully with dmd for Linux:

struct S(alias F)
    extern(C++) static impl()

class C
    void f();
    void f(int);

S!(__traits(getOverloads, C, "f")[0]) x;

It looks like a null pointer access.

Sep 04 2021