Fix signed integer overflow in data-streamer.c
commitc76141f619ced6c2887182c80f0867471c5b8090
authortrippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Sep 2014 07:07:55 +0000 (30 07:07 +0000)
committertrippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Sep 2014 07:07:55 +0000 (30 07:07 +0000)
treef7674b307aebc628adf661a398bf3c3a990f9d10
parent191d50d7eb6831b8739b005e3256515e465a465c
Fix signed integer overflow in data-streamer.c

Running the testsuite with a -fsanitize=undefined instrumented compiler
shows:
 % gcc -O2 -flto -fno-use-linker-plugin -flto-partition=none testsuite/gcc.dg/torture/pr28045.c
gcc/data-streamer.c:113:45: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself

The fix is obvious.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215706 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/data-streamer.c