[Issue 20224] New: Segfault when using ref parameter on a templated struct (C++ mangling)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 18 01:58:12 UTC 2019


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

          Issue ID: 20224
           Summary: Segfault when using ref parameter on a templated
                    struct (C++ mangling)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: andrej.mitrovich at gmail.com

extern(C++) public int foo(T)(set!T set);  // ok
extern(C++) public int bar(T)(ref set!T set);  // segfault

struct set (T)
{
    void test ()
    {
        foo!T(this);
        bar!T(this);  // segfaults
    }
}

void main ()
{
    set!int x;
}

--


More information about the Digitalmars-d-bugs mailing list