www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16598] New: [REG2.069] ICE with void ternary + finalizers

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

          Issue ID: 16598
           Summary: [REG2.069] ICE with void ternary + finalizers
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

//////////// test.d ///////////
struct S
{
    this(int) {}
    ~this() {}
}

int g(S a, S b)
{
    return 1;
}

void main()
{
    true ? g(S(), S(1)) : {}();
}
///////////////////////////////

Produces:

Internal error: backend/cod1.c 1654

Introduced in https://github.com/D-Programming-Language/dmd/pull/5003

--
Oct 05 2016