Re: [PATCH] fold-const: Fix up make_range_step [PR105189]

2022-04-07 Thread Richard Biener via Gcc-patches
> Am 07.04.2022 um 17:47 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > The following testcase is miscompiled, because fold_truth_andor > incorrectly folds > (unsigned) foo () >= 0U && 1 > into > foo () >= 0 > For the unsigned comparison (which is useless in this case, > as >= 0U is a

[PATCH] fold-const: Fix up make_range_step [PR105189]

2022-04-07 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because fold_truth_andor incorrectly folds (unsigned) foo () >= 0U && 1 into foo () >= 0 For the unsigned comparison (which is useless in this case, as >= 0U is always true, but hasn't been folded yet), previous make_range_step derives exp (unsigned) foo