https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98457
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>: https://gcc.gnu.org/g:fda5b17a89e5066e19371ea138253bbb9cad262a commit r9-9364-gfda5b17a89e5066e19371ea138253bbb9cad262a Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Mon Apr 19 18:45:32 2021 +0200 d: Fix ICE in when formating a string with '%' or '`' characters (PR98457) The percentage character was being confused for a format specifier in pp_format(), whilst the backtick character was confused for the beginning of a quoted string in expand_d_format(). Both are now properly escaped to avoid the ICE. gcc/d/ChangeLog: PR d/98457 * d-diagnostic.cc (expand_d_format): Handle escaped backticks. (escape_d_format): New funtion. (verror): Call escape_d_format on prefixing strings. (vdeprecation): Likewise. gcc/testsuite/ChangeLog: PR d/98457 * gdc.dg/pr98457.d: New test. (cherry picked from commit dc7d1c74ffb1cc85e67984632f581d526c783770)