www.digitalmars.com         C & C++   DMDScript  

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

https://issues.dlang.org/show_bug.cgi?id=22276

          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