https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98921
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>: https://gcc.gnu.org/g:38c2d9598b1b2f23b24f96fd8f58a89344b93609 commit r10-9334-g38c2d9598b1b2f23b24f96fd8f58a89344b93609 Author: Iain Buclaw <ibuc...@gdcproject.org> Date: Tue Feb 2 00:52:49 2021 +0100 d: Fix junk in generated symbol on powerpc64-*-* [PR98921] This adds a special formatter to OutBuffer to handle formatted printing of integers, a common case. The replacement is faster and safer. In dmangle.c, it also gets rid of a number of problematic casts, as seen on powerpc64 targets. gcc/d/ChangeLog: PR d/98921 * dmd/dmangle.c (Mangler::visit (TypeSArray *)): Use buf->print to format integer value. (Mangler::visit (TypeIdentifier *)): Likewise. (Mangler::toBuffer): Likewise. (Mangler::visit (IntegerExp *)): Likewise. (Mangler::visit (StringExp *)): Likewise. (Mangler::visit (ArrayLiteralExp *)): Likewise. (Mangler::visit (AssocArrayLiteralExp *)): Likewise. (Mangler::visit (StructLiteralExp *)): Likewise. * dmd/root/outbuffer.c (OutBuffer::print): New function. * dmd/root/outbuffer.h (OutBuffer::print): Declare. (cherry picked from commit 6a481021a65d6237b0c509a76fcd9c1f32c4558e)