https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77709
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2016-09-23 CC| |msebor at gcc dot gnu.org Ever confirmed|0 |1 Known to fail| |7.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed. This is a bug in the gimple-ssa-sprintf.c code. As you noted, dstsize will have the value of UINT_MAX on the target (or more precisely, SIZE_MAX on the target), which is less than HOST_WIDE_INT_MAX on the host. The code needs to use the value of (SIZE_MAX / 2) on the target for this test.