https://issues.dlang.org/show_bug.cgi?id=14829
--- Comment #4 from Walter Bright <[email protected]> --- Somewhat smaller test case that only requires -O to fail: int decodeImpl(int[] str) { return 1; } int[] stripLeft(int[] str) { while (true) { int[] a = str; int[] s = a; int dc = decodeImpl(str); str = str[1 .. $]; bool w = dc != 1; if (!w) return s; } } void main () { int[1] a = 2; assert (stripLeft(a)[0] == 2); // fails with -O } --
