https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118449
--- Comment #4 from Iain Buclaw <ibuclaw at gcc dot gnu.org> --- This commit r15-6816-gdd3026f05111a0. Which pulls in this change from upstream https://github.com/dlang/dmd/pull/16971 However, I can still trigger the fault in custom_gc if I were to add +1 loop iterations in the test. From: ``` void main() { // test array append cache char[] s; foreach (char c; char.min .. char.max + 1) s ~= c; } ``` To: ``` void main() { // test array append cache char[] s; foreach (short c; char.min .. char.max + 2) s ~= cast(char)c; } ``` It was just a coincidence that the test didn't fail before.