On Wed, Aug 06, 2025 at 05:57:50PM +0800, Yang Yujie wrote:
> In BEXTC, whether a _BitInt object is properly extended is examined
> by a value comparison against a copied object in a wider _BitInt
> type that utilizes all of the partial limb.
>
> Since the (implicit) conversion to the wider type may be optimized
> away now and cause the result of the comparison to always be true,
> we need to cast the copied object down to the original type to
> force a extension, so that it can serve as our reference.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/bitintext.h (BEXTC1): Define. Convert the copied
> object back to the original type before comparison.
> (BEXTC): Use BEXTC1 for both the signed and the unsigned case.
Ok.
Jakub