[Bug tree-optimization/85158] ubsan and -O3 finds a problem

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Apr 3 09:00:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158

--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 3 Apr 2018, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85158
> 
> --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> As a middle-ground between ints, HOST_WIDE_INTs and unlimited precision we have
> offset_int, widest_int etc.  But perhaps using even that would be too costly.

Not sure - we seem to get away with gmp in niter analysis just "fine".

What the current code misses if we don't go all the way to unlimited 
precision is a failure mode on overflow given overflow almost certainly
results in wrong-code with enough bad luck.

Anyway, IIRC we went to HWIs already to handle "most" cases, and yes,
the lambda_vector case is still "unfixed" at ints.  But what's still
missing is the failure mode...  (I fear that a hard assert will
trigger way too often...)


More information about the Gcc-bugs mailing list