Re: [PATCH] PR tree-optimization/78170: Truncate sign-extended padding when encoding bitfields

2016-11-02 Thread Richard Biener
On Tue, Nov 1, 2016 at 12:54 PM, Kyrill Tkachov wrote: > Hi all, > > In this PR the code writes a -1 to a bitfield of size 17 bits and ends up > overwriting another bitfields. > The problem is that the intermediate buffer in encode_tree_to_bitpos holding > the value

[PATCH] PR tree-optimization/78170: Truncate sign-extended padding when encoding bitfields

2016-11-01 Thread Kyrill Tkachov
Hi all, In this PR the code writes a -1 to a bitfield of size 17 bits and ends up overwriting another bitfields. The problem is that the intermediate buffer in encode_tree_to_bitpos holding the value to merge holds a 24-bit temporary with -1 written to it i.e. sign-extended to all ones. That