> Am 16.04.2025 um 15:24 schrieb Eric Botcazou <botca...@adacore.com>:
>
> Hi,
>
> this is a regression introduced on the mainline and 14 branch by:
> https://gcc.gnu.org/pipermail/gcc-cvs/2023-October/391658.html
>
> The change bypasses int_fits_type_p (essentially) to work around the
> signedness constraints, but in doing so disregards the peculiarities of
> boolean types whose precision is not 1 that are dealt with by the predicate,
> leading to the creation of a problematic conversion here.
>
> Fixed by special-casing boolean types whose precision is not 1, as done in
> several other places.
>
> Tested on x86-64/Linux, OK for the mainline and 14 branch?
Ok
Richard
>
> 2025-04-15 Eric Botcazou <ebotca...@adacore.com>
>
> * tree-ssa-phiopt.cc (factor_out_conditional_operation): Do not
> bypass the int_fits_type_p test for boolean types whose precision
> is not 1.
>
>
> 2025-04-15 Eric Botcazou <ebotca...@adacore.com>
>
> * gnat.dg/opt105.adb: New test.
> * gnat.dg/opt105_pkg.ads, gnat.dg/opt105_pkg.adb: New helper.
>
> --
> Eric Botcazou
> <p.diff>
> <opt105.adb>
> <opt105_pkg.ads>
> <opt105_pkg.adb>