www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23882] New: ICE (segfault) on nasty alias this code

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

          Issue ID: 23882
           Summary: ICE (segfault) on nasty alias this code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin gmail.com

struct G(H)
{
    Tuple!(R) S;
}

struct BB(H)
{
    H* YC;
    alias YC this;
}

struct R
{
    BB!(G!float) CB;
    alias CB this;

    this(typeof(CB.S).init);
}

class ND
{
    R[] RD()
    {
        return null;
    }
}

struct Tuple(Specs)
{
    Specs expand;

    this(Specs values)
    {
        expand = values;
    }
}


run.dlang.io says the segfault is there since 2.092.1

onlineapp.d(17): Error: `typeof((*YC).S).init` is used as a type
Segmentation fault (core dumped)

--
May 04 2023