This is the mail archive of the gcc-patches@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]

Re: [PATCH, LIBGCC] Avoid count_leading_zeros with undefined result (PR 78067)


On Thu, 27 Oct 2016, Bernd Edlinger wrote:

> Hi,
> 
> by code reading I became aware that libgcc can call count_leading_zeros
> in certain cases which can give undefined results.  This happens on
> signed int128 -> float or double conversions, when the int128 is in the range
> INT64_MAX+1 to UINT64_MAX.

I'd expect testcases added to the testsuite that exercise this case at 
runtime, if not already present.

-- 
Joseph S. Myers
joseph@codesourcery.com


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