https://issues.dlang.org/show_bug.cgi?id=14699
--- Comment #4 from Ketmar Dark <[email protected]> --- sorry, slightly better patch: diff --git a/src/mtype.c b/src/mtype.c index e15206d..a464b49 100644 --- a/src/mtype.c +++ b/src/mtype.c @@ -4076,6 +4076,11 @@ Type *TypeSArray::semantic(Loc loc, Scope *sc) error(loc, "index %llu overflow for static array", (unsigned long long)d1); goto Lerror; } + else if (d2 == 0) + { + error(loc, "index %llu underflow for static array", (unsigned long long)d1); + goto Lerror; + } } } switch (tbn->ty) --
