www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22760] New: Segmentation fault in CppMangleVisitor.template_arg

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

          Issue ID: 22760
           Summary: Segmentation fault in CppMangleVisitor.template_arg
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: tim.dlang t-online.de

The following code results in a segmentation fault for DMD in
dmd.cppmangle.CppMangleVisitor.template_arg:

extern(C++) void f(T)(T)
{
}
struct S1(T)
{
    struct S2
    {
    }
}
int main()
{
    f(S1!int.S2());
    return 0;
}

--
Feb 10 2022