From 2.069, following code is broken. Code: int addAssignSimple(int[] , const(int)[] ) { uint c; return c; } void mulKaratsuba(int[] result, const(int)[] x, const(int)[] y, int[] ) { const(int)[] y1 = y; int[] newscratchbuff; int[] resultHigh = result; bool ysmaller2 = x.length >= y1.length; newscratchbuff[0..y1.length] = resultHigh; mulKaratsuba( resultHigh[1..$], ysmaller2 ? x[1..$] : y1, ysmaller2 ? y1 : x, newscratchbuff[y1.length..$] ); addAssignSimple(resultHigh[1..$], newscratchbuff[0..y1.length]); } Command and output: > dmd -O -c test.d DMD v2.069 DEBUG findreg(0, line=1919, file='backend\cgcod.c', function = '_D4test12mulKaratsubaFAiAxiAxiAiZv') Internal error: backend\cgcod.c 1651 Regression introduced in: https://github.com/D-Programming-Language/dmd/pull/5100
I found this problem during my PR updating for issue 6620. https://github.com/D-Programming-Language/dmd/pull/4035
https://github.com/D-Programming-Language/dmd/pull/5656
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4f32b7f31453107ad2c12f3801c9e916a718efd0 fix Issue 15898 - [REG2.069] Internal error: backend\cgcod.c 1651 https://github.com/D-Programming-Language/dmd/commit/0810e354381c2d1551059e24f440415332bf50cf Merge pull request #5660 from 9rnsr/fix15898 fix Issue 15898 - [REG2.069] Internal error: backend\cgcod.c 1651
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4f32b7f31453107ad2c12f3801c9e916a718efd0 fix Issue 15898 - [REG2.069] Internal error: backend\cgcod.c 1651 https://github.com/dlang/dmd/commit/0810e354381c2d1551059e24f440415332bf50cf Merge pull request #5660 from 9rnsr/fix15898