Fix PR61657 (undefined behavior in loop-iv.c)
authortrippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Aug 2015 16:44:30 +0000 (16:44 +0000)
committertrippels <trippels@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Aug 2015 16:44:30 +0000 (16:44 +0000)
commit8308815586fbc62e680e34d1fa32e2687db88c07
treedc8b58a037ecde64170bd90464b597621c8066a1
parentd57a4af6ccdf04d74c6a8c614f79a286ecb335cb
Fix PR61657 (undefined behavior in loop-iv.c)

bootstrap-ubsan shows:
 loop-iv.c:2626:14: runtime error: signed integer overflow: 9223372036854775806 - -9223372036854775808 cannot be represented in type 'long int'

Fixed by moving the variables in question from signed to unsigned.

PR rtl-optimization/61657
* loop-iv.c (iv_number_of_iterations): Declare up and down as
unsigned. Remove superflous uint64_t cast.

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