This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/77709] specified destination size warning does not work when cross-compiling from 64 host to 32bit target


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]