Re: [PATCH] convert: Fix test for out of bounds shift count [PR113574]

2024-01-25 Thread Richard Biener
On Thu, 25 Jan 2024, Jakub Jelinek wrote: > Hi! > > The following patch is miscompiled, because convert_to_integer_1 for > LSHIFT_EXPR tests if the INTEGER_CST shift count is too high, but > incorrectly compares it against TYPE_SIZE rather than TYPE_PRECISION. > The type in question is unsigned _

[PATCH] convert: Fix test for out of bounds shift count [PR113574]

2024-01-25 Thread Jakub Jelinek
Hi! The following patch is miscompiled, because convert_to_integer_1 for LSHIFT_EXPR tests if the INTEGER_CST shift count is too high, but incorrectly compares it against TYPE_SIZE rather than TYPE_PRECISION. The type in question is unsigned _BitInt(1), which has TYPE_PRECISION 1, TYPE_SIZE 8, and