Re: [PATCH] Fix UB in ipa-polymorphic-call.c (PR tree-optimization/81603)

2017-07-31 Thread Richard Biener
On Mon, 31 Jul 2017, Jakub Jelinek wrote: > Hi! > > ipa_polymorphic_call_context offset field is in bits (for whatever reason), > and the following computations can overflow and invoke UB. > This patch computes it in offset_int instead and punts if there is overflow. > > Bootstrapped/regtested o

[PATCH] Fix UB in ipa-polymorphic-call.c (PR tree-optimization/81603)

2017-07-31 Thread Jakub Jelinek
Hi! ipa_polymorphic_call_context offset field is in bits (for whatever reason), and the following computations can overflow and invoke UB. This patch computes it in offset_int instead and punts if there is overflow. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2017-07-31