https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83198
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Dec 15 22:14:41 2017 New Revision: 255728 URL: https://gcc.gnu.org/viewcvs?rev=255728&root=gcc&view=rev Log: Backported from mainline 2017-12-14 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/83198 * gimple-ssa-sprintf.c (format_floating): Set type solely based on dir.modifier, regardless of TREE_TYPE (arg). Assume non-REAL_CST value if arg is a REAL_CST with incompatible type. * gcc.dg/pr83198.c: New test. * gcc.dg/tree-ssa/pr83198.c: New test. Added: branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr83198.c branches/gcc-7-branch/gcc/testsuite/gcc.dg/tree-ssa/pr83198.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/gimple-ssa-sprintf.c branches/gcc-7-branch/gcc/testsuite/ChangeLog