[Bug tree-optimization/66828] [5/6 Regression] gcc/tree-ssa-math-opts.c:2182:38: runtime error: left shift of 72057594037927936 by 8 places cannot be represented in type 'long int'

thopre01 at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 13 06:16:00 GMT 2015


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

Thomas Preud'homme <thopre01 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-07-13
     Ever confirmed|0                           |1

--- Comment #1 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> ---
I'm having trouble to reproduce the bug. I do encounter some ubsan errors but
in other files (most notably in hwint.h). This might hide the errors in
tree-ssa-math-opts.c

Anyway, according to the line number the issue seems to come from the following
line:

for (i = 0; i < size; i++, inc <<= BITS_PER_MARKER)

size is guaranteed to be less or equal to 64 / BITS_PER_MARKER as per checks in
find_bswap_or_nop_1 (CASE_CONVERT) and in init_symbolic_number. However, this
means after the last execution of the body, inc is shift by more than 63 bits
in total.

I'm now testing a patch via bootstrap + regression testsuite.



More information about the Gcc-bugs mailing list