This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/77709] specified destination size warning does not work when cross-compiling from 64 host to 32bit target
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Sep 2016 19:05:30 +0000
- Subject: [Bug middle-end/77709] specified destination size warning does not work when cross-compiling from 64 host to 32bit target
- Auto-submitted: auto-generated
- References: <bug-77709-4@http.gcc.gnu.org/bugzilla/>
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.