https://issues.dlang.org/show_bug.cgi?id=15450
Issue ID: 15450 Summary: ICE during CTFE of legit function Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: and...@erdani.com Repro below fails with: dmd: interpret.c:1034: Expression* interpret(FuncDeclaration*, InterState*, Expressions*, Expression*): Assertion `!e || (e->op != TOKcontinue && e->op != TOKbreak)' failed. ==================== struct BigO { struct Atom { int id; double exp; double logExp; } private Atom[][] terms; int opCmp(const BigO rhs) const { int result = 0; bigone: foreach (ref l; terms) { foreach (ref r; rhs.terms) { if (l == r) continue bigone; if (smaller(l, r)) { if (result == 1) return 0; if (result == 0) result = -1; continue bigone; } if (smaller(r, l)) { if (result == -1) return 0; if (result == 0) result = 1; continue bigone; } } // Not comparable return 0; } return result; } private static bool smaller(const(Atom)[] lhs, const(Atom)[] rhs) { return 0; } } static immutable linear = BigO([ [ BigO.Atom(0, 1, 0) ] ]); static assert(linear >= linear); --