www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17146] New: Internal error: tk.c 266 with -O -inline

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

          Issue ID: 17146
           Summary: Internal error: tk.c 266 with -O -inline
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: sludwig outerproduct.org

---
final class C {
    void foo() {
        S[] s;
        if (s[$-1] == S.init) {}
    }
}

struct S { int[] a; int b; }

void bar() { C.init.foo(); }
---

compiling with "dmd -O -inline" yields "Internal error: tk.c 266"

Original occurrence: https://github.com/rejectedsoftware/diet-ng/issues/15

--
Feb 04 2017