> Hi,
>
> in GCC 15 we allowed jump-function generation code to skip over a
> type-cast converting one integer to another as long as the latter can
> hold all the values of the former or has at least the same precision.
> This works well for IPA-CP where we do then evaluate each jump
> function as we propagate values and value-ranges. However, the
> test-case in PR 120295 shows a problem with inlining, where we combine
> pass-through jump-functions so that they are always relative to the
> function which is the root of the inline tree. Unfortunately, we are
> happy to combine also those with type-casts to a different signedness
> which makes us use sign zero extension for the expected value ranges
> where we should have used sign extension. When the value-range which
> then leads to wrong insertion of a call to builtin_unreachable is
> being computed, the information about an existence of a intermediary
> signed type has already been lost during previous inlining.
>
> This patch simply blocks combining such jump-functions so that it is
> back-portable to GCC 15. Once we switch pass-through jump functions
> to use a vector of operations rather than having room for just one, we
> will be able to address this situation with adding an extra conversion
> instead.
>
> Bootstrapped and LTO-bootstrapped on x86_64-linux. OK for master and
> gcc-15 branch?
>
> Thanks,
>
> Martin
>
>
> gcc/ChangeLog:
>
> 2025-05-19 Martin Jambor <mjam...@suse.cz>
>
> PR ipa/120295
> * ipa-prop.cc (update_jump_functions_after_inlining): Do not
> combine pass-through jump functions with type-casts changing
> signedness.
>
> gcc/testsuite/ChangeLog:
>
> 2025-05-19 Martin Jambor <mjam...@suse.cz>
>
> PR ipa/120295
> * gcc.dg/ipa/pr120295.c: New test.
OK,
thanks!
Honza