www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22737] New: Segnementation fault in

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

          Issue ID: 22737
           Summary: Segnementation fault in
                    CppMangleVisitor.getTiNamespace
           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.getTiNamespace:

alias Identity(T) = T;
extern(C++) Identity!T identity(T)(T val)
{
    return Identity!T(val);
}
void main()
{
    auto x = identity(5);
}

--
Feb 04 2022