Re: [PATCH] Fix UB in tree-chkp.c

2017-06-19 Thread Ilya Enkovich
2017-06-19 20:43 GMT+03:00 Jakub Jelinek : > Hi! > > bootstrap-ubsan shows a couple of: > ../../gcc/tree-chkp.c:694:37: runtime error: shift exponent 63 is too large > for 32-bit type 'int' > errors. > > 1 << (TYPE_PRECISION (ptr_type_node) - 1) > should have been obviously > HOST_WIDE_INT_1U << (

[PATCH] Fix UB in tree-chkp.c

2017-06-19 Thread Jakub Jelinek
Hi! bootstrap-ubsan shows a couple of: ../../gcc/tree-chkp.c:694:37: runtime error: shift exponent 63 is too large for 32-bit type 'int' errors. 1 << (TYPE_PRECISION (ptr_type_node) - 1) should have been obviously HOST_WIDE_INT_1U << (TYPE_PRECISION (ptr_type_node) - 1) but even then, it is 1) u