[Bug other/59545] New: Signed integer overflow issues

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 18 12:36:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59545

            Bug ID: 59545
           Summary: Signed integer overflow issues
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org

I ran bootstrap with -fsanitize=undefined, here's a list of issues I've found.

combine.c:8204:6: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long int'; cast to an unsigned type to negate this value
to itself
combine.c:8204:6: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long int'; cast to an unsigned type to negate this value
to itself
double-int.c:141:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long int'; cast to an unsigned type to negate this value
to itself
double-int.c:141:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long int'; cast to an unsigned type to negate this value
to itself
double-int.c:141:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long int'; cast to an unsigned type to negate this value
to itself
double-int.c:141:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long int'; cast to an unsigned type to negate this value
to itself
genattrtab.c:622:27: runtime error: signed integer overflow: 4568797 * 613
cannot be represented in type 'int'
genautomata.c:3497:23: runtime error: shift exponent 64 is too large for 64-bit
type 'long unsigned int'
ifcvt.c:1116:18: runtime error: signed integer overflow: -9223372036854775808 -
9223372036854775807 cannot be represented in type 'long int'
ifcvt.c:1116:18: runtime error: signed integer overflow: -9223372036854775808 -
9223372036854775807 cannot be represented in type 'long int'
ira-color.c:1508:29: runtime error: signed integer overflow: -12123975 * 185
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -128583990 * 811
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -128583990 * 811
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -128583990 * 811
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -128583990 * 811
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 590
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 590
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 590
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -131071000 * 590
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -13238070 * 808
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -134813175 * 122
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -14909212 * 910
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -15417108 * 941
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -16383750 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -16383750 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -16383750 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -16383750 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -16383750 * 250
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -17664042 * 500
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -17664042 * 500
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -19958478 * 219
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -20479687 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -20659906 * 194
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -20971200 * 320
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -22908412 * 127
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -230460334 * 19
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -230460334 * 19
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -262140400 * 125
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -262140400 * 125
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -263662610 * 52
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -26473766 * 129
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -26698580 * 250
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -28163857 * 191
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -4095937 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -4095937 * 1000
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -57072202 * 311
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -65535000 * 61
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -7659400 * 394
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -8847224 * 270
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -8847224 * 270
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -8847224 * 270
cannot be represented in type 'int'
ira-color.c:1508:29: runtime error: signed integer overflow: -8847224 * 270
cannot be represented in type 'int'
postreload.c:1770:24: runtime error: signed integer overflow: 0 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 0 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 0 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 0 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 11 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 20 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 20 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow:
7378697629483820646 - -1844674407370955162 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
-8446744073709551617 - 999999999999999999 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
8646911284551352320 - -9223372036854775808 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -281474976710656 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -281474976710656 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223090561878065153 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
9223372036854775807 - -9223372036854775808 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
-9223372036854775808 - 8935141660703064064 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
-9223372036854775808 - 8935141660703064064 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow:
-9223372036854775808 - 9223372036854775807 cannot be represented in type 'long
int'
postreload.c:1770:24: runtime error: signed integer overflow: 999999999999999 -
-9223372036854775808 cannot be represented in type 'long int'
postreload.c:1770:24: runtime error: signed integer overflow: 9999999999999999
- -9223372036854775808 cannot be represented in type 'long int'
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:1650:16: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate this
value to itself
simplify-rtx.c:4124:23: runtime error: signed integer overflow:
1844674407370955161 - -9223372036854775808 cannot be represented in type 'long
int'
simplify-rtx.c:4124:23: runtime error: signed integer overflow:
-9223372036854775808 - 1 cannot be represented in type 'long int'
simplify-rtx.c:4124:23: runtime error: signed integer overflow:
-9223372036854775808 - 1 cannot be represented in type 'long int'
stor-layout.c:2529:13: runtime error: signed integer overflow:
-9223372036854775808 + -1 cannot be represented in type 'long int'



More information about the Gcc-bugs mailing list