https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102989
--- Comment #110 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:52e2aaaa70e847d240fb68a27c88ee60189515a6 commit r14-3759-g52e2aaaa70e847d240fb68a27c88ee60189515a6 Author: Jakub Jelinek <ja...@redhat.com> Date: Wed Sep 6 17:52:24 2023 +0200 Additional _BitInt test coverage [PR102989] On Tue, Sep 05, 2023 at 10:40:26PM +0000, Joseph Myers wrote: > Additional tests I think should be added (for things I expect should > already work): > > * Tests for BITINT_MAXWIDTH in <limits.h>. Test that it's defined for > C2x, but not defined for C11/C17 (the latter independent of whether the > target has _BitInt support). Test the value as well: _BitInt > (BITINT_MAXWIDTH) should be OK (both signed and unsigned) but _BitInt > (BITINT_MAXWIDTH + 1) should not be OK. Also test that BITINT_MAXWIDTH >= > ULLONG_MAX. > > * Test _BitInt (N) where N is a constexpr variable or enum constant (I > expect these should work - the required call to convert_lvalue_to_rvalue > for constexpr to work is present - but I don't see such tests in the > testsuite). > > * Test that -funsigned-bitfields does not affect the signedness of _BitInt > (N) bit-fields (the standard wording isn't entirely clear, but that's > what's implemented in the patches). > > * Test the errors for _Sat used with _BitInt (though such a test might not > actually run at present because no target supports both features). The following patch does that plus for most of the new changes in the C _BitInt support patch requested in patch review it also does testsuite coverage. 2023-09-06 Jakub Jelinek <ja...@redhat.com> PR c/102989 * gcc.dg/bitint-2.c (foo): Add tests for constexpr var or enumerator arguments of _BitInt. * gcc.dg/bitint-31.c: Remove forgotten 0 &&. * gcc.dg/bitint-32.c: New test. * gcc.dg/bitint-33.c: New test. * gcc.dg/bitint-34.c: New test. * gcc.dg/bitint-35.c: New test. * gcc.dg/bitint-36.c: New test. * gcc.dg/fixed-point/bitint-1.c: New test.