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

            Bug ID: 61903
           Summary: signed integer overflow in expmed.c
                    store_fixed_bit_filed_1
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com

Compiling testsuite code pr28045.c the sanitizer claims that a signed integer
overflow occurs at expmed.c:1071
"../../gcc-4.9.1/gcc/expmed.c:1071:41: runtime error: signed integer overflow:
-9223372036854775808 + -1 cannot be represented in type 'long int'"
The offending instruction is
"v &= ((HOST_WIDE_INT) 1 << bitsize) - 1;"
This is in store_fixed_bit_field_1 on x86-64.

Reply via email to