Hi,

While discussing Adhemerval's patch to use Gnulib's fts in glibc, there
was a desire to avoid importing bitrotate.h which C2y has equivalent
functionality for.

I've attached patches adding the stdc_rotate_{left,right} macros and
functions, but have not pushed them yet. It is probably worth noting
that these functions are required to work when the shift is greater than
the width of the word. This is not the case with the ones from
bitrotate.h.

Tested with GCC 4.8.5 which does not have the builtins for these
functions and GCC 15 & 16 which do.

I only modified stdbit_h.m4 slightly. It assumes that if stdbit.h exists
it supports C2y or the subset provided by C23. If it only supports C23
functionality, it will be generated. That feels reasonable to me, but
wanted another set of eyes to look over it.

Collin

>From b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca Mon Sep 17 00:00:00 2001
Message-ID: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 7 Mar 2026 14:28:35 -0800
Subject: [PATCH 1/4] stdc_rotate_left: New module.

* lib/stdbit.in.h: Setup #include_next for the system stdbit.h. Don't
declare C23 functions if the system has stdbit.h.
(_GL_STDC_ROTATE_LEFT_INLINE, __gl_stdc_rotate_left, stdc_rotate_left):
New macros.
(stdc_rotate_left_uc, stdc_rotate_left_us, stdc_rotate_left_ui)
(stdc_rotate_left_ul, stdc_rotate_left_ull): New functions.
* lib/stdc_rotate_left.c: New file.
* modules/stdc_rotate_left: Likewise.
* m4/stdbit_h.m4 (gl_STDBIT_H): Define HAVE_STDBIT_H and
GL_STDC_ROTATE_LEFT. Check for stdc_rotate_left_uc to see if the system
header is missing C2y features.
* modules/stdbit (Depends-on): Add the new stdc_rotate_left module.
* modules/stdbit-h (Depends-on): Add include_next.
(Makefile.am): Substitute @HAVE_STDBIT_H@, @GL_STDC_ROTATE_LEFT@, and
some variables needed for #include_next in the generated header.
---
 ChangeLog                | 19 +++++++++
 lib/stdbit.in.h          | 86 ++++++++++++++++++++++++++++++++++++++--
 lib/stdc_rotate_left.c   | 19 +++++++++
 m4/stdbit_h.m4           | 22 ++++++++--
 modules/stdbit           |  1 +
 modules/stdbit-h         |  8 ++++
 modules/stdc_rotate_left | 27 +++++++++++++
 7 files changed, 175 insertions(+), 7 deletions(-)
 create mode 100644 lib/stdc_rotate_left.c
 create mode 100644 modules/stdc_rotate_left

diff --git a/ChangeLog b/ChangeLog
index f6f25dc8fe..ffe3abb5e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2026-03-07  Collin Funk  <[email protected]>
+
+	stdc_rotate_left: New module.
+	* lib/stdbit.in.h: Setup #include_next for the system stdbit.h. Don't
+	declare C23 functions if the system has stdbit.h.
+	(_GL_STDC_ROTATE_LEFT_INLINE, __gl_stdc_rotate_left, stdc_rotate_left):
+	New macros.
+	(stdc_rotate_left_uc, stdc_rotate_left_us, stdc_rotate_left_ui)
+	(stdc_rotate_left_ul, stdc_rotate_left_ull): New functions.
+	* lib/stdc_rotate_left.c: New file.
+	* modules/stdc_rotate_left: Likewise.
+	* m4/stdbit_h.m4 (gl_STDBIT_H): Define HAVE_STDBIT_H and
+	GL_STDC_ROTATE_LEFT. Check for stdc_rotate_left_uc to see if the system
+	header is missing C2y features.
+	* modules/stdbit (Depends-on): Add the new stdc_rotate_left module.
+	* modules/stdbit-h (Depends-on): Add include_next.
+	(Makefile.am): Substitute @HAVE_STDBIT_H@, @GL_STDC_ROTATE_LEFT@, and
+	some variables needed for #include_next in the generated header.
+
 2026-03-06  Bruno Haible  <[email protected]>
 
 	gnulib-tool.py: Fix default handling for --local-{symlink,hardlink}.
diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h
index 88f298afb9..dd4add11c9 100644
--- a/lib/stdbit.in.h
+++ b/lib/stdbit.in.h
@@ -17,8 +17,20 @@
 
 /* Written by Paul Eggert.  */
 
-#ifndef STDBIT_H
-#define STDBIT_H 1
+#ifndef _@GUARD_PREFIX@_STDBIT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_STDBIT_H@
+# @INCLUDE_NEXT@ @NEXT_STDBIT_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_STDBIT_H
+#define _@GUARD_PREFIX@_STDBIT_H
 
 /* This file uses _GL_INLINE, WORDS_BIGENDIAN.  */
 #if !_GL_CONFIG_H_INCLUDED
@@ -72,6 +84,9 @@ _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_STDC_BIT_CEIL_INLINE
 # define _GL_STDC_BIT_CEIL_INLINE _GL_INLINE
 #endif
+#ifndef _GL_STDC_ROTATE_LEFT_INLINE
+# define _GL_STDC_ROTATE_LEFT_INLINE _GL_INLINE
+#endif
 
 /* An expression, preferably with the type of A, that has the value of B.  */
 #if ((defined __GNUC__ && 2 <= __GNUC__) \
@@ -89,6 +104,8 @@ _GL_INLINE_HEADER_BEGIN
 # define _GL_STDBIT_TYPEOF_CAST(a, b) (b)
 #endif
 
+/* Some systems are only missing C2y features in stdbit.h.  */
+#if !@HAVE_STDBIT_H@
 
 /* ISO C 23 ยง 7.18.1 General  */
 
@@ -1068,6 +1085,68 @@ stdc_bit_ceil_ull (unsigned long long int n)
 
 #endif
 
+#endif /* @HAVE_STDBIT_H@ */
+
+#if @GL_STDC_ROTATE_LEFT@
+
+# if defined __has_builtin
+#  if __has_builtin (__builtin_stdc_rotate_left)
+#   define __gl_stdc_rotate_left __builtin_stdc_rotate_left
+#   define stdc_rotate_left __builtin_stdc_rotate_left
+#  endif
+# endif
+
+# if ! defined __gl_stdc_rotate_left
+#  define __gl_stdc_rotate_left(value, count)             \
+  ((value << (count & (sizeof value * 8 - 1)))            \
+   | (value >> ((-count) & (sizeof value * 8 - 1))))
+# endif
+
+_GL_STDC_ROTATE_LEFT_INLINE unsigned char
+stdc_rotate_left_uc (unsigned char value, unsigned int count)
+{
+  return __gl_stdc_rotate_left (value, count);
+}
+
+_GL_STDC_ROTATE_LEFT_INLINE unsigned short int
+stdc_rotate_left_us (unsigned short int value, unsigned int count)
+{
+  return __gl_stdc_rotate_left (value, count);
+}
+
+_GL_STDC_ROTATE_LEFT_INLINE unsigned int
+stdc_rotate_left_ui (unsigned int value, unsigned int count)
+{
+  return __gl_stdc_rotate_left (value, count);
+}
+
+_GL_STDC_ROTATE_LEFT_INLINE unsigned long int
+stdc_rotate_left_ul (unsigned long int value, unsigned int count)
+{
+  return __gl_stdc_rotate_left (value, count);
+}
+
+_GL_STDC_ROTATE_LEFT_INLINE unsigned long long int
+stdc_rotate_left_ull (unsigned long long int value, unsigned int count)
+{
+  return __gl_stdc_rotate_left (value, count);
+}
+
+# if ! defined stdc_rotate_left
+#  define stdc_rotate_left(value, count)                                \
+  (_GL_STDBIT_TYPEOF_CAST                                               \
+   (value,                                                              \
+    (sizeof (value) == 1 ? stdc_rotate_left_uc (value, count)           \
+     : (sizeof (value) == sizeof (unsigned short int)                   \
+        ? stdc_rotate_left_us (value, count)                            \
+        : (sizeof (value) == sizeof 0u                                  \
+           ? stdc_rotate_left_ui (value, count)                         \
+           : (sizeof (value) == sizeof 0ul                              \
+              ? stdc_rotate_left_ul (value, count)                      \
+              : stdc_rotate_left_ull (value, count)))))))
+# endif
+
+#endif
 
 #ifdef __cplusplus
 }
@@ -1075,4 +1154,5 @@ stdc_bit_ceil_ull (unsigned long long int n)
 
 _GL_INLINE_HEADER_END
 
-#endif /* STDBIT_H */
+#endif /* _@GUARD_PREFIX@_STDBIT_H */
+#endif /* _@GUARD_PREFIX@_STDBIT_H */
diff --git a/lib/stdc_rotate_left.c b/lib/stdc_rotate_left.c
new file mode 100644
index 0000000000..196aa963c9
--- /dev/null
+++ b/lib/stdc_rotate_left.c
@@ -0,0 +1,19 @@
+/* stdc_rotate_left_* functions.
+   Copyright (C) 2026 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#define _GL_STDC_ROTATE_LEFT_INLINE _GL_EXTERN_INLINE
+#include <config.h>
+#include <stdbit.h>
diff --git a/m4/stdbit_h.m4 b/m4/stdbit_h.m4
index 517a0a8cc7..fc552b8de4 100644
--- a/m4/stdbit_h.m4
+++ b/m4/stdbit_h.m4
@@ -1,5 +1,5 @@
 # stdbit_h.m4
-# serial 2
+# serial 3
 dnl Copyright 2024-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,15 +12,28 @@ AC_DEFUN_ONCE([gl_STDBIT_H]
 [
   AC_REQUIRE([gl_BIGENDIAN])
 
-  AC_CHECK_HEADERS_ONCE([stdbit.h])
+  gl_CHECK_NEXT_HEADERS([stdbit.h])
   if test $ac_cv_header_stdbit_h = yes; then
-    GL_GENERATE_STDBIT_H=false
+    HAVE_STDBIT_H=1
+  else
+    HAVE_STDBIT_H=0
+  fi
+  AC_SUBST([HAVE_STDBIT_H])
+
+  if test $ac_cv_header_stdbit_h = yes; then
+    dnl We may have a stdbit.h without C2y features.
+    AC_CHECK_DECLS([stdc_rotate_left_uc], , , [[#include <stdbit.h>]])
+    if test $ac_cv_have_decl_stdc_rotate_left_uc = no; then
+      GL_GENERATE_STDBIT_H=true
+    else
+      GL_GENERATE_STDBIT_H=false
+    fi
   else
     GL_GENERATE_STDBIT_H=true
   fi
 
   dnl We don't use gl_MODULE_INDICATOR_INIT_VARIABLE here, because stdbit.in.h
-  dnl does not use #include_next.
+  dnl does not use #include_next in the same way as other modules.
   GL_STDC_LEADING_ZEROS=0;       AC_SUBST([GL_STDC_LEADING_ZEROS])
   GL_STDC_LEADING_ONES=0;        AC_SUBST([GL_STDC_LEADING_ONES])
   GL_STDC_TRAILING_ZEROS=0;      AC_SUBST([GL_STDC_TRAILING_ZEROS])
@@ -35,4 +48,5 @@ AC_DEFUN_ONCE([gl_STDBIT_H]
   GL_STDC_BIT_WIDTH=0;           AC_SUBST([GL_STDC_BIT_WIDTH])
   GL_STDC_BIT_FLOOR=0;           AC_SUBST([GL_STDC_BIT_FLOOR])
   GL_STDC_BIT_CEIL=0;            AC_SUBST([GL_STDC_BIT_CEIL])
+  GL_STDC_ROTATE_LEFT=0;         AC_SUBST([GL_STDC_ROTATE_LEFT])
 ])
diff --git a/modules/stdbit b/modules/stdbit
index e2ddabac56..3ffc7530a3 100644
--- a/modules/stdbit
+++ b/modules/stdbit
@@ -19,6 +19,7 @@ stdc_has_single_bit
 stdc_bit_width
 stdc_bit_floor
 stdc_bit_ceil
+stdc_rotate_left
 
 configure.ac:
 
diff --git a/modules/stdbit-h b/modules/stdbit-h
index bb99004177..9668e5c402 100644
--- a/modules/stdbit-h
+++ b/modules/stdbit-h
@@ -8,6 +8,7 @@ m4/stdbit_h.m4
 
 Depends-on:
 gen-header
+include_next
 extern-inline           [$GL_GENERATE_STDBIT_H]
 bool                    [$GL_GENERATE_STDBIT_H]
 
@@ -25,6 +26,12 @@ if GL_GENERATE_STDBIT_H
 stdbit.h: stdbit.in.h $(top_builddir)/config.status
 @NMD@	$(AM_V_GEN)$(MKDIR_P) '%reldir%'
 	$(gl_V_at)$(SED_HEADER_STDOUT) \
+	  -e 's/@''HAVE_STDBIT_H''@/$(HAVE_STDBIT_H)/g' \
+	  -e 's/@''GUARD_PREFIX''@/$(GUARD_PREFIX)/g' \
+	  -e 's/@''PRAGMA_SYSTEM_HEADER''@/$(PRAGMA_SYSTEM_HEADER)/g' \
+	  -e 's/@''PRAGMA_COLUMNS''@/$(PRAGMA_COLUMNS)/g' \
+	  -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+	  -e 's/@''NEXT_STDBIT_H''@/$(NEXT_STDBIT_H)/g' \
 	  -e 's/@''GL_STDC_LEADING_ZEROS''@/$(GL_STDC_LEADING_ZEROS)/g' \
 	  -e 's/@''GL_STDC_LEADING_ONES''@/$(GL_STDC_LEADING_ONES)/g' \
 	  -e 's/@''GL_STDC_TRAILING_ZEROS''@/$(GL_STDC_TRAILING_ZEROS)/g' \
@@ -39,6 +46,7 @@ stdbit.h: stdbit.in.h $(top_builddir)/config.status
 	  -e 's/@''GL_STDC_BIT_WIDTH''@/$(GL_STDC_BIT_WIDTH)/g' \
 	  -e 's/@''GL_STDC_BIT_FLOOR''@/$(GL_STDC_BIT_FLOOR)/g' \
 	  -e 's/@''GL_STDC_BIT_CEIL''@/$(GL_STDC_BIT_CEIL)/g' \
+	  -e 's/@''GL_STDC_ROTATE_LEFT''@/$(GL_STDC_ROTATE_LEFT)/g' \
 	  $(srcdir)/stdbit.in.h > $@-t
 	$(AM_V_at)mv $@-t $@
 lib_SOURCES += stdbit.c
diff --git a/modules/stdc_rotate_left b/modules/stdc_rotate_left
new file mode 100644
index 0000000000..2ab85f43fc
--- /dev/null
+++ b/modules/stdc_rotate_left
@@ -0,0 +1,27 @@
+Description:
+stdc_rotate_left macro, stdc_rotate_left_* functions:
+Perform a left circular shift.
+
+Files:
+lib/stdc_rotate_left.c
+
+Depends-on:
+stdbit-h
+
+configure.ac:
+AC_REQUIRE([gl_STDBIT_H])
+GL_STDC_ROTATE_LEFT=1
+
+Makefile.am:
+if GL_GENERATE_STDBIT_H
+lib_SOURCES += stdc_rotate_left.c
+endif
+
+Include:
+<stdbit.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
-- 
2.53.0

>From 667ce854bd060dcf4e6669d5fff9dad9d94d84a8 Mon Sep 17 00:00:00 2001
Message-ID: <667ce854bd060dcf4e6669d5fff9dad9d94d84a8.1772924325.git.collin.fu...@gmail.com>
In-Reply-To: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
References: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 7 Mar 2026 14:29:45 -0800
Subject: [PATCH 2/4] stdc_rotate_left: Add tests.

* modules/stdc_rotate_left-tests: New file.
* tests/test-stdc_rotate_left.c: Likewise.
---
 ChangeLog                      |   4 +
 modules/stdc_rotate_left-tests |  11 +
 tests/test-stdc_rotate_left.c  | 461 +++++++++++++++++++++++++++++++++
 3 files changed, 476 insertions(+)
 create mode 100644 modules/stdc_rotate_left-tests
 create mode 100644 tests/test-stdc_rotate_left.c

diff --git a/ChangeLog b/ChangeLog
index ffe3abb5e4..59da835979 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2026-03-07  Collin Funk  <[email protected]>
 
+	stdc_rotate_left: Add tests.
+	* modules/stdc_rotate_left-tests: New file.
+	* tests/test-stdc_rotate_left.c: Likewise.
+
 	stdc_rotate_left: New module.
 	* lib/stdbit.in.h: Setup #include_next for the system stdbit.h. Don't
 	declare C23 functions if the system has stdbit.h.
diff --git a/modules/stdc_rotate_left-tests b/modules/stdc_rotate_left-tests
new file mode 100644
index 0000000000..f88e0adf97
--- /dev/null
+++ b/modules/stdc_rotate_left-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-stdc_rotate_left.c
+tests/macros.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-stdc_rotate_left
+check_PROGRAMS += test-stdc_rotate_left
diff --git a/tests/test-stdc_rotate_left.c b/tests/test-stdc_rotate_left.c
new file mode 100644
index 0000000000..ab1a32e662
--- /dev/null
+++ b/tests/test-stdc_rotate_left.c
@@ -0,0 +1,461 @@
+/* Test the stdc_rotate_left_* functions and macro.
+   Copyright (C) 2026 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published
+   by the Free Software Foundation, either version 3 of the License,
+   or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Collin Funk <[email protected]>, 2026.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdbit.h>
+
+#include "macros.h"
+
+#define TEST_CASE(type, function, value, shift, expect)         \
+  do                                                            \
+    {                                                           \
+      type v = value;                                           \
+      type e = expect;                                          \
+      ASSERT (function (v, shift) == expect);                   \
+      ASSERT (stdc_rotate_left (v, shift) == expect);           \
+    }                                                           \
+  while (false)
+
+static void
+test_stdc_rotate_left_uc (void)
+{
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 0, 0x96);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 1, 0x2d);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 2, 0x5a);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 3, 0xb4);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 4, 0x69);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 5, 0xd2);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 6, 0xa5);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 7, 0x4b);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 8, 0x96);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 9, 0x2d);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 10, 0x5a);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 11, 0xb4);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 12, 0x69);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 13, 0xd2);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 14, 0xa5);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 15, 0x4b);
+  TEST_CASE (unsigned char, stdc_rotate_left_uc, 0x96, 16, 0x96);
+}
+
+static void
+test_stdc_rotate_left_us (void)
+{
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 0, 0x5e1aU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 1, 0xbc34U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 2, 0x7869U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 3, 0xf0d2U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 4, 0xe1a5U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 5, 0xc34bU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 6, 0x8697U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 7, 0x0d2fU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 8, 0x1a5eU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 9, 0x34bcU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 10, 0x6978U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 11, 0xd2f0U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 12, 0xa5e1U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 13, 0x4bc3U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 14, 0x9786U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 15, 0x2f0dU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 16, 0x5e1aU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 17, 0xbc34U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 18, 0x7869U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 19, 0xf0d2U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 20, 0xe1a5U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 21, 0xc34bU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 22, 0x8697U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 23, 0x0d2fU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 24, 0x1a5eU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 25, 0x34bcU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 26, 0x6978U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 27, 0xd2f0U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 28, 0xa5e1U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 29, 0x4bc3U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 30, 0x9786U);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 31, 0x2f0dU);
+  TEST_CASE (unsigned short int, stdc_rotate_left_us, 0x5e1aU, 32, 0x5e1aU);
+}
+
+#define TEST_CASES_32(type, function)                                   \
+  do                                                                    \
+    {                                                                   \
+      TEST_CASE (type, function, 0x51af3678UL, 0, 0x51af3678UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 1, 0xa35e6cf0UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 2, 0x46bcd9e1UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 3, 0x8d79b3c2UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 4, 0x1af36785UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 5, 0x35e6cf0aUL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 6, 0x6bcd9e14UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 7, 0xd79b3c28UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 8, 0xaf367851UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 9, 0x5e6cf0a3UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 10, 0xbcd9e146UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 11, 0x79b3c28dUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 12, 0xf367851aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 13, 0xe6cf0a35UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 14, 0xcd9e146bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 15, 0x9b3c28d7UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 16, 0x367851afUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 17, 0x6cf0a35eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 18, 0xd9e146bcUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 19, 0xb3c28d79UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 20, 0x67851af3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 21, 0xcf0a35e6UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 22, 0x9e146bcdUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 23, 0x3c28d79bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 24, 0x7851af36UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 25, 0xf0a35e6cUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 26, 0xe146bcd9UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 27, 0xc28d79b3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 28, 0x851af367UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 29, 0x0a35e6cfUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 30, 0x146bcd9eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 31, 0x28d79b3cUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 32, 0x51af3678UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 33, 0xa35e6cf0UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 34, 0x46bcd9e1UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 35, 0x8d79b3c2UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 36, 0x1af36785UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 37, 0x35e6cf0aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 38, 0x6bcd9e14UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 39, 0xd79b3c28UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 40, 0xaf367851UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 41, 0x5e6cf0a3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 42, 0xbcd9e146UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 43, 0x79b3c28dUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 44, 0xf367851aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 45, 0xe6cf0a35UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 46, 0xcd9e146bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 47, 0x9b3c28d7UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 48, 0x367851afUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 49, 0x6cf0a35eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 50, 0xd9e146bcUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 51, 0xb3c28d79UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 52, 0x67851af3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 53, 0xcf0a35e6UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 54, 0x9e146bcdUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 55, 0x3c28d79bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 56, 0x7851af36UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 57, 0xf0a35e6cUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 58, 0xe146bcd9UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 59, 0xc28d79b3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 60, 0x851af367UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 61, 0x0a35e6cfUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 62, 0x146bcd9eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 63, 0x28d79b3cUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 64, 0x51af3678UL);       \
+    }                                                                   \
+  while (false)
+
+static void
+test_stdc_rotate_left_ui (void)
+{
+  TEST_CASES_32 (unsigned int, stdc_rotate_left_ui);
+}
+
+#define TEST_CASES_64(type, function)                                   \
+  do                                                                    \
+    {                                                                   \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 0,              \
+                 0x59ae28915a84db37ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 1,              \
+                 0xb35c5122b509b66eULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 2,              \
+                 0x66b8a2456a136cddULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 3,              \
+                 0xcd71448ad426d9baULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 4,              \
+                 0x9ae28915a84db375ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 5,              \
+                 0x35c5122b509b66ebULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 6,              \
+                 0x6b8a2456a136cdd6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 7,              \
+                 0xd71448ad426d9bacULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 8,              \
+                 0xae28915a84db3759ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 9,              \
+                 0x5c5122b509b66eb3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 10,             \
+                 0xb8a2456a136cdd66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 11,             \
+                 0x71448ad426d9bacdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 12,             \
+                 0xe28915a84db3759aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 13,             \
+                 0xc5122b509b66eb35ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 14,             \
+                 0x8a2456a136cdd66bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 15,             \
+                 0x1448ad426d9bacd7ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 16,             \
+                 0x28915a84db3759aeULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 17,             \
+                 0x5122b509b66eb35cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 18,             \
+                 0xa2456a136cdd66b8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 19,             \
+                 0x448ad426d9bacd71ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 20,             \
+                 0x8915a84db3759ae2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 21,             \
+                 0x122b509b66eb35c5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 22,             \
+                 0x2456a136cdd66b8aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 23,             \
+                 0x48ad426d9bacd714ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 24,             \
+                 0x915a84db3759ae28ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 25,             \
+                 0x22b509b66eb35c51ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 26,             \
+                 0x456a136cdd66b8a2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 27,             \
+                 0x8ad426d9bacd7144ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 28,             \
+                 0x15a84db3759ae289ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 29,             \
+                 0x2b509b66eb35c512ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 30,             \
+                 0x56a136cdd66b8a24ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 31,             \
+                 0xad426d9bacd71448ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 32,             \
+                 0x5a84db3759ae2891ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 33,             \
+                 0xb509b66eb35c5122ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 34,             \
+                 0x6a136cdd66b8a245ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 35,             \
+                 0xd426d9bacd71448aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 36,             \
+                 0xa84db3759ae28915ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 37,             \
+                 0x509b66eb35c5122bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 38,             \
+                 0xa136cdd66b8a2456ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 39,             \
+                 0x426d9bacd71448adULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 40,             \
+                 0x84db3759ae28915aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 41,             \
+                 0x09b66eb35c5122b5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 42,             \
+                 0x136cdd66b8a2456aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 43,             \
+                 0x26d9bacd71448ad4ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 44,             \
+                 0x4db3759ae28915a8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 45,             \
+                 0x9b66eb35c5122b50ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 46,             \
+                 0x36cdd66b8a2456a1ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 47,             \
+                 0x6d9bacd71448ad42ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 48,             \
+                 0xdb3759ae28915a84ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 49,             \
+                 0xb66eb35c5122b509ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 50,             \
+                 0x6cdd66b8a2456a13ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 51,             \
+                 0xd9bacd71448ad426ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 52,             \
+                 0xb3759ae28915a84dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 53,             \
+                 0x66eb35c5122b509bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 54,             \
+                 0xcdd66b8a2456a136ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 55,             \
+                 0x9bacd71448ad426dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 56,             \
+                 0x3759ae28915a84dbULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 57,             \
+                 0x6eb35c5122b509b6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 58,             \
+                 0xdd66b8a2456a136cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 59,             \
+                 0xbacd71448ad426d9ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 60,             \
+                 0x759ae28915a84db3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 61,             \
+                 0xeb35c5122b509b66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 62,             \
+                 0xd66b8a2456a136cdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 63,             \
+                 0xacd71448ad426d9bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 64,             \
+                 0x59ae28915a84db37ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 65,             \
+                 0xb35c5122b509b66eULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 66,             \
+                 0x66b8a2456a136cddULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 67,             \
+                 0xcd71448ad426d9baULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 68,             \
+                 0x9ae28915a84db375ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 69,             \
+                 0x35c5122b509b66ebULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 70,             \
+                 0x6b8a2456a136cdd6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 71,             \
+                 0xd71448ad426d9bacULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 72,             \
+                 0xae28915a84db3759ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 73,             \
+                 0x5c5122b509b66eb3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 74,             \
+                 0xb8a2456a136cdd66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 75,             \
+                 0x71448ad426d9bacdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 76,             \
+                 0xe28915a84db3759aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 77,             \
+                 0xc5122b509b66eb35ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 78,             \
+                 0x8a2456a136cdd66bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 79,             \
+                 0x1448ad426d9bacd7ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 80,             \
+                 0x28915a84db3759aeULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 81,             \
+                 0x5122b509b66eb35cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 82,             \
+                 0xa2456a136cdd66b8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 83,             \
+                 0x448ad426d9bacd71ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 84,             \
+                 0x8915a84db3759ae2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 85,             \
+                 0x122b509b66eb35c5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 86,             \
+                 0x2456a136cdd66b8aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 87,             \
+                 0x48ad426d9bacd714ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 88,             \
+                 0x915a84db3759ae28ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 89,             \
+                 0x22b509b66eb35c51ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 90,             \
+                 0x456a136cdd66b8a2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 91,             \
+                 0x8ad426d9bacd7144ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 92,             \
+                 0x15a84db3759ae289ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 93,             \
+                 0x2b509b66eb35c512ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 94,             \
+                 0x56a136cdd66b8a24ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 95,             \
+                 0xad426d9bacd71448ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 96,             \
+                 0x5a84db3759ae2891ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 97,             \
+                 0xb509b66eb35c5122ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 98,             \
+                 0x6a136cdd66b8a245ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 99,             \
+                 0xd426d9bacd71448aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 100,            \
+                 0xa84db3759ae28915ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 101,            \
+                 0x509b66eb35c5122bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 102,            \
+                 0xa136cdd66b8a2456ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 103,            \
+                 0x426d9bacd71448adULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 104,            \
+                 0x84db3759ae28915aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 105,            \
+                 0x09b66eb35c5122b5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 106,            \
+                 0x136cdd66b8a2456aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 107,            \
+                 0x26d9bacd71448ad4ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 108,            \
+                 0x4db3759ae28915a8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 109,            \
+                 0x9b66eb35c5122b50ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 110,            \
+                 0x36cdd66b8a2456a1ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 111,            \
+                 0x6d9bacd71448ad42ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 112,            \
+                 0xdb3759ae28915a84ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 113,            \
+                 0xb66eb35c5122b509ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 114,            \
+                 0x6cdd66b8a2456a13ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 115,            \
+                 0xd9bacd71448ad426ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 116,            \
+                 0xb3759ae28915a84dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 117,            \
+                 0x66eb35c5122b509bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 118,            \
+                 0xcdd66b8a2456a136ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 119,            \
+                 0x9bacd71448ad426dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 120,            \
+                 0x3759ae28915a84dbULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 121,            \
+                 0x6eb35c5122b509b6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 122,            \
+                 0xdd66b8a2456a136cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 123,            \
+                 0xbacd71448ad426d9ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 124,            \
+                 0x759ae28915a84db3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 125,            \
+                 0xeb35c5122b509b66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 126,            \
+                 0xd66b8a2456a136cdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 127,            \
+                 0xacd71448ad426d9bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 128,            \
+                 0x59ae28915a84db37ULL);                                \
+    }                                                                   \
+  while (false)
+
+static void
+test_stdc_rotate_left_ul (void)
+{
+  if (sizeof 0ul < sizeof 0ull)
+    TEST_CASES_32 (unsigned long int, stdc_rotate_left_ul);
+  else
+    TEST_CASES_64 (unsigned long int, stdc_rotate_left_ul);
+}
+
+static void
+test_stdc_rotate_left_ull (void)
+{
+  TEST_CASES_64 (unsigned long long int, stdc_rotate_left_ull);
+}
+
+int
+main (void)
+{
+  test_stdc_rotate_left_uc ();
+  test_stdc_rotate_left_us ();
+  test_stdc_rotate_left_ui ();
+  test_stdc_rotate_left_ul ();
+  test_stdc_rotate_left_ull ();
+  return test_exit_status;
+}
-- 
2.53.0

>From 36d7bbf07341982062d83fbc562f100087497981 Mon Sep 17 00:00:00 2001
Message-ID: <36d7bbf07341982062d83fbc562f100087497981.1772924325.git.collin.fu...@gmail.com>
In-Reply-To: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
References: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 7 Mar 2026 14:52:43 -0800
Subject: [PATCH 3/4] stdc_rotate_right: New module.

* lib/stdbit.in.h (_GL_STDC_ROTATE_RIGHT_INLINE, __gl_stdc_rotate_right)
(stdc_rotate_right): New macros.
(stdc_rotate_right_uc, stdc_rotate_right_us, stdc_rotate_right_ui)
(stdc_rotate_right_ul, stdc_rotate_right_ull): New functions.
* lib/stdc_rotate_right.c: New file.
* modules/stdc_rotate_right: Likewise.
* m4/stdbit_h.m4 (gl_STDBIT_H): Define GL_STDC_ROTATE_RIGHT.
* modules/stdbit (Depends-on): Add the new stdc_rotate_right module.
* modules/stdbit-h (Makefile.am): Substitute @GL_STDC_ROTATE_RIGHT@ in
the generated header.
---
 ChangeLog                 | 12 ++++++++
 lib/stdbit.in.h           | 64 +++++++++++++++++++++++++++++++++++++++
 lib/stdc_rotate_right.c   | 19 ++++++++++++
 m4/stdbit_h.m4            |  3 +-
 modules/stdbit            |  1 +
 modules/stdbit-h          |  1 +
 modules/stdc_rotate_right | 27 +++++++++++++++++
 7 files changed, 126 insertions(+), 1 deletion(-)
 create mode 100644 lib/stdc_rotate_right.c
 create mode 100644 modules/stdc_rotate_right

diff --git a/ChangeLog b/ChangeLog
index 59da835979..1b623b9c48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2026-03-07  Collin Funk  <[email protected]>
 
+	stdc_rotate_right: New module.
+	* lib/stdbit.in.h (_GL_STDC_ROTATE_RIGHT_INLINE, __gl_stdc_rotate_right)
+	(stdc_rotate_right): New macros.
+	(stdc_rotate_right_uc, stdc_rotate_right_us, stdc_rotate_right_ui)
+	(stdc_rotate_right_ul, stdc_rotate_right_ull): New functions.
+	* lib/stdc_rotate_right.c: New file.
+	* modules/stdc_rotate_right: Likewise.
+	* m4/stdbit_h.m4 (gl_STDBIT_H): Define GL_STDC_ROTATE_RIGHT.
+	* modules/stdbit (Depends-on): Add the new stdc_rotate_right module.
+	* modules/stdbit-h (Makefile.am): Substitute @GL_STDC_ROTATE_RIGHT@ in
+	the generated header.
+
 	stdc_rotate_left: Add tests.
 	* modules/stdc_rotate_left-tests: New file.
 	* tests/test-stdc_rotate_left.c: Likewise.
diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h
index dd4add11c9..2eb64564f2 100644
--- a/lib/stdbit.in.h
+++ b/lib/stdbit.in.h
@@ -87,6 +87,9 @@ _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_STDC_ROTATE_LEFT_INLINE
 # define _GL_STDC_ROTATE_LEFT_INLINE _GL_INLINE
 #endif
+#ifndef _GL_STDC_ROTATE_RIGHT_INLINE
+# define _GL_STDC_ROTATE_RIGHT_INLINE _GL_INLINE
+#endif
 
 /* An expression, preferably with the type of A, that has the value of B.  */
 #if ((defined __GNUC__ && 2 <= __GNUC__) \
@@ -1148,6 +1151,67 @@ stdc_rotate_left_ull (unsigned long long int value, unsigned int count)
 
 #endif
 
+#if @GL_STDC_ROTATE_RIGHT@
+
+# if defined __has_builtin
+#  if __has_builtin (__builtin_stdc_rotate_right)
+#   define __gl_stdc_rotate_right __builtin_stdc_rotate_right
+#   define stdc_rotate_right __builtin_stdc_rotate_right
+#  endif
+# endif
+
+# if ! defined __gl_stdc_rotate_right
+#  define __gl_stdc_rotate_right(value, count)             \
+  ((value >> (count & (sizeof value * 8 - 1)))             \
+   | (value << ((-count) & (sizeof value * 8 - 1))))
+# endif
+
+_GL_STDC_ROTATE_RIGHT_INLINE unsigned char
+stdc_rotate_right_uc (unsigned char value, unsigned int count)
+{
+  return __gl_stdc_rotate_right (value, count);
+}
+
+_GL_STDC_ROTATE_RIGHT_INLINE unsigned short int
+stdc_rotate_right_us (unsigned short int value, unsigned int count)
+{
+  return __gl_stdc_rotate_right (value, count);
+}
+
+_GL_STDC_ROTATE_RIGHT_INLINE unsigned int
+stdc_rotate_right_ui (unsigned int value, unsigned int count)
+{
+  return __gl_stdc_rotate_right (value, count);
+}
+
+_GL_STDC_ROTATE_RIGHT_INLINE unsigned long int
+stdc_rotate_right_ul (unsigned long int value, unsigned int count)
+{
+  return __gl_stdc_rotate_right (value, count);
+}
+
+_GL_STDC_ROTATE_RIGHT_INLINE unsigned long long int
+stdc_rotate_right_ull (unsigned long long int value, unsigned int count)
+{
+  return __gl_stdc_rotate_right (value, count);
+}
+
+# if ! defined stdc_rotate_right
+#  define stdc_rotate_right(value, count)                               \
+  (_GL_STDBIT_TYPEOF_CAST                                               \
+   (value,                                                              \
+    (sizeof (value) == 1 ? stdc_rotate_right_uc (value, count)          \
+     : (sizeof (value) == sizeof (unsigned short int)                   \
+        ? stdc_rotate_right_us (value, count)                           \
+        : (sizeof (value) == sizeof 0u                                  \
+           ? stdc_rotate_right_ui (value, count)                        \
+           : (sizeof (value) == sizeof 0ul                              \
+              ? stdc_rotate_right_ul (value, count)                     \
+              : stdc_rotate_right_ull (value, count)))))))
+# endif
+
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/stdc_rotate_right.c b/lib/stdc_rotate_right.c
new file mode 100644
index 0000000000..6aa5e11797
--- /dev/null
+++ b/lib/stdc_rotate_right.c
@@ -0,0 +1,19 @@
+/* stdc_rotate_right_* functions.
+   Copyright (C) 2026 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#define _GL_STDC_ROTATE_RIGHT_INLINE _GL_EXTERN_INLINE
+#include <config.h>
+#include <stdbit.h>
diff --git a/m4/stdbit_h.m4 b/m4/stdbit_h.m4
index fc552b8de4..8b8e3e7e1e 100644
--- a/m4/stdbit_h.m4
+++ b/m4/stdbit_h.m4
@@ -1,5 +1,5 @@
 # stdbit_h.m4
-# serial 3
+# serial 4
 dnl Copyright 2024-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -49,4 +49,5 @@ AC_DEFUN_ONCE([gl_STDBIT_H]
   GL_STDC_BIT_FLOOR=0;           AC_SUBST([GL_STDC_BIT_FLOOR])
   GL_STDC_BIT_CEIL=0;            AC_SUBST([GL_STDC_BIT_CEIL])
   GL_STDC_ROTATE_LEFT=0;         AC_SUBST([GL_STDC_ROTATE_LEFT])
+  GL_STDC_ROTATE_RIGHT=0;        AC_SUBST([GL_STDC_ROTATE_RIGHT])
 ])
diff --git a/modules/stdbit b/modules/stdbit
index 3ffc7530a3..e9c7788edd 100644
--- a/modules/stdbit
+++ b/modules/stdbit
@@ -20,6 +20,7 @@ stdc_bit_width
 stdc_bit_floor
 stdc_bit_ceil
 stdc_rotate_left
+stdc_rotate_right
 
 configure.ac:
 
diff --git a/modules/stdbit-h b/modules/stdbit-h
index 9668e5c402..096c5b45c1 100644
--- a/modules/stdbit-h
+++ b/modules/stdbit-h
@@ -47,6 +47,7 @@ stdbit.h: stdbit.in.h $(top_builddir)/config.status
 	  -e 's/@''GL_STDC_BIT_FLOOR''@/$(GL_STDC_BIT_FLOOR)/g' \
 	  -e 's/@''GL_STDC_BIT_CEIL''@/$(GL_STDC_BIT_CEIL)/g' \
 	  -e 's/@''GL_STDC_ROTATE_LEFT''@/$(GL_STDC_ROTATE_LEFT)/g' \
+	  -e 's/@''GL_STDC_ROTATE_RIGHT''@/$(GL_STDC_ROTATE_RIGHT)/g' \
 	  $(srcdir)/stdbit.in.h > $@-t
 	$(AM_V_at)mv $@-t $@
 lib_SOURCES += stdbit.c
diff --git a/modules/stdc_rotate_right b/modules/stdc_rotate_right
new file mode 100644
index 0000000000..f6733f321d
--- /dev/null
+++ b/modules/stdc_rotate_right
@@ -0,0 +1,27 @@
+Description:
+stdc_rotate_right macro, stdc_rotate_right_* functions:
+Perform a right circular shift.
+
+Files:
+lib/stdc_rotate_right.c
+
+Depends-on:
+stdbit-h
+
+configure.ac:
+AC_REQUIRE([gl_STDBIT_H])
+GL_STDC_ROTATE_RIGHT=1
+
+Makefile.am:
+if GL_GENERATE_STDBIT_H
+lib_SOURCES += stdc_rotate_right.c
+endif
+
+Include:
+<stdbit.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
-- 
2.53.0

>From 3cbf06642f79293689cb4be1994d35014ba9311c Mon Sep 17 00:00:00 2001
Message-ID: <3cbf06642f79293689cb4be1994d35014ba9311c.1772924325.git.collin.fu...@gmail.com>
In-Reply-To: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
References: <b530ed0b46fbf6c49b2369b8cedd56bb3a25f4ca.1772924325.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 7 Mar 2026 14:53:29 -0800
Subject: [PATCH 4/4] stdc_rotate_right: Add tests.

* modules/stdc_rotate_right-tests: New file.
* tests/test-stdc_rotate_right.c: Likewise.
---
 ChangeLog                       |   4 +
 modules/stdc_rotate_right-tests |  11 +
 tests/test-stdc_rotate_right.c  | 461 ++++++++++++++++++++++++++++++++
 3 files changed, 476 insertions(+)
 create mode 100644 modules/stdc_rotate_right-tests
 create mode 100644 tests/test-stdc_rotate_right.c

diff --git a/ChangeLog b/ChangeLog
index 1b623b9c48..bc49d257dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2026-03-07  Collin Funk  <[email protected]>
 
+	stdc_rotate_right: Add tests.
+	* modules/stdc_rotate_right-tests: New file.
+	* tests/test-stdc_rotate_right.c: Likewise.
+
 	stdc_rotate_right: New module.
 	* lib/stdbit.in.h (_GL_STDC_ROTATE_RIGHT_INLINE, __gl_stdc_rotate_right)
 	(stdc_rotate_right): New macros.
diff --git a/modules/stdc_rotate_right-tests b/modules/stdc_rotate_right-tests
new file mode 100644
index 0000000000..8a8047010e
--- /dev/null
+++ b/modules/stdc_rotate_right-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-stdc_rotate_right.c
+tests/macros.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-stdc_rotate_right
+check_PROGRAMS += test-stdc_rotate_right
diff --git a/tests/test-stdc_rotate_right.c b/tests/test-stdc_rotate_right.c
new file mode 100644
index 0000000000..c424d75cc2
--- /dev/null
+++ b/tests/test-stdc_rotate_right.c
@@ -0,0 +1,461 @@
+/* Test the stdc_rotate_right_* functions and macro.
+   Copyright (C) 2026 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published
+   by the Free Software Foundation, either version 3 of the License,
+   or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Collin Funk <[email protected]>, 2026.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdbit.h>
+
+#include "macros.h"
+
+#define TEST_CASE(type, function, value, shift, expect)         \
+  do                                                            \
+    {                                                           \
+      type v = value;                                           \
+      type e = expect;                                          \
+      ASSERT (function (v, shift) == expect);                   \
+      ASSERT (stdc_rotate_right (v, shift) == expect);           \
+    }                                                           \
+  while (false)
+
+static void
+test_stdc_rotate_right_uc (void)
+{
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 0, 0x96);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 1, 0x4b);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 2, 0xa5);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 3, 0xd2);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 4, 0x69);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 5, 0xb4);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 6, 0x5a);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 7, 0x2d);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 8, 0x96);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 9, 0x4b);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 10, 0xa5);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 11, 0xd2);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 12, 0x69);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 13, 0xb4);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 14, 0x5a);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 15, 0x2d);
+  TEST_CASE (unsigned char, stdc_rotate_right_uc, 0x96, 16, 0x96);
+}
+
+static void
+test_stdc_rotate_right_us (void)
+{
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 0, 0x5e1aU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 1, 0x2f0dU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 2, 0x9786U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 3, 0x4bc3U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 4, 0xa5e1U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 5, 0xd2f0U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 6, 0x6978U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 7, 0x34bcU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 8, 0x1a5eU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 9, 0x0d2fU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 10, 0x8697U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 11, 0xc34bU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 12, 0xe1a5U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 13, 0xf0d2U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 14, 0x7869U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 15, 0xbc34U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 16, 0x5e1aU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 17, 0x2f0dU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 18, 0x9786U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 19, 0x4bc3U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 20, 0xa5e1U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 21, 0xd2f0U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 22, 0x6978U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 23, 0x34bcU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 24, 0x1a5eU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 25, 0x0d2fU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 26, 0x8697U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 27, 0xc34bU);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 28, 0xe1a5U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 29, 0xf0d2U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 30, 0x7869U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 31, 0xbc34U);
+  TEST_CASE (unsigned short int, stdc_rotate_right_us, 0x5e1aU, 32, 0x5e1aU);
+}
+
+#define TEST_CASES_32(type, function)                                   \
+  do                                                                    \
+    {                                                                   \
+      TEST_CASE (type, function, 0x51af3678UL, 0, 0x51af3678UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 1, 0x28d79b3cUL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 2, 0x146bcd9eUL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 3, 0x0a35e6cfUL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 4, 0x851af367UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 5, 0xc28d79b3UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 6, 0xe146bcd9UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 7, 0xf0a35e6cUL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 8, 0x7851af36UL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 9, 0x3c28d79bUL);        \
+      TEST_CASE (type, function, 0x51af3678UL, 10, 0x9e146bcdUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 11, 0xcf0a35e6UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 12, 0x67851af3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 13, 0xb3c28d79UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 14, 0xd9e146bcUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 15, 0x6cf0a35eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 16, 0x367851afUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 17, 0x9b3c28d7UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 18, 0xcd9e146bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 19, 0xe6cf0a35UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 20, 0xf367851aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 21, 0x79b3c28dUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 22, 0xbcd9e146UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 23, 0x5e6cf0a3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 24, 0xaf367851UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 25, 0xd79b3c28UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 26, 0x6bcd9e14UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 27, 0x35e6cf0aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 28, 0x1af36785UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 29, 0x8d79b3c2UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 30, 0x46bcd9e1UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 31, 0xa35e6cf0UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 32, 0x51af3678UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 33, 0x28d79b3cUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 34, 0x146bcd9eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 35, 0x0a35e6cfUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 36, 0x851af367UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 37, 0xc28d79b3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 38, 0xe146bcd9UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 39, 0xf0a35e6cUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 40, 0x7851af36UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 41, 0x3c28d79bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 42, 0x9e146bcdUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 43, 0xcf0a35e6UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 44, 0x67851af3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 45, 0xb3c28d79UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 46, 0xd9e146bcUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 47, 0x6cf0a35eUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 48, 0x367851afUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 49, 0x9b3c28d7UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 50, 0xcd9e146bUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 51, 0xe6cf0a35UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 52, 0xf367851aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 53, 0x79b3c28dUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 54, 0xbcd9e146UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 55, 0x5e6cf0a3UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 56, 0xaf367851UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 57, 0xd79b3c28UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 58, 0x6bcd9e14UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 59, 0x35e6cf0aUL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 60, 0x1af36785UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 61, 0x8d79b3c2UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 62, 0x46bcd9e1UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 63, 0xa35e6cf0UL);       \
+      TEST_CASE (type, function, 0x51af3678UL, 64, 0x51af3678UL);       \
+    }                                                                   \
+  while (false)
+
+static void
+test_stdc_rotate_right_ui (void)
+{
+  TEST_CASES_32 (unsigned int, stdc_rotate_right_ui);
+}
+
+#define TEST_CASES_64(type, function)                                   \
+  do                                                                    \
+    {                                                                   \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 0,              \
+                 0x59ae28915a84db37ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 1,              \
+                 0xacd71448ad426d9bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 2,              \
+                 0xd66b8a2456a136cdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 3,              \
+                 0xeb35c5122b509b66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 4,              \
+                 0x759ae28915a84db3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 5,              \
+                 0xbacd71448ad426d9ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 6,              \
+                 0xdd66b8a2456a136cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 7,              \
+                 0x6eb35c5122b509b6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 8,              \
+                 0x3759ae28915a84dbULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 9,              \
+                 0x9bacd71448ad426dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 10,             \
+                 0xcdd66b8a2456a136ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 11,             \
+                 0x66eb35c5122b509bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 12,             \
+                 0xb3759ae28915a84dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 13,             \
+                 0xd9bacd71448ad426ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 14,             \
+                 0x6cdd66b8a2456a13ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 15,             \
+                 0xb66eb35c5122b509ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 16,             \
+                 0xdb3759ae28915a84ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 17,             \
+                 0x6d9bacd71448ad42ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 18,             \
+                 0x36cdd66b8a2456a1ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 19,             \
+                 0x9b66eb35c5122b50ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 20,             \
+                 0x4db3759ae28915a8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 21,             \
+                 0x26d9bacd71448ad4ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 22,             \
+                 0x136cdd66b8a2456aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 23,             \
+                 0x09b66eb35c5122b5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 24,             \
+                 0x84db3759ae28915aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 25,             \
+                 0x426d9bacd71448adULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 26,             \
+                 0xa136cdd66b8a2456ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 27,             \
+                 0x509b66eb35c5122bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 28,             \
+                 0xa84db3759ae28915ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 29,             \
+                 0xd426d9bacd71448aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 30,             \
+                 0x6a136cdd66b8a245ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 31,             \
+                 0xb509b66eb35c5122ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 32,             \
+                 0x5a84db3759ae2891ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 33,             \
+                 0xad426d9bacd71448ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 34,             \
+                 0x56a136cdd66b8a24ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 35,             \
+                 0x2b509b66eb35c512ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 36,             \
+                 0x15a84db3759ae289ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 37,             \
+                 0x8ad426d9bacd7144ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 38,             \
+                 0x456a136cdd66b8a2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 39,             \
+                 0x22b509b66eb35c51ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 40,             \
+                 0x915a84db3759ae28ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 41,             \
+                 0x48ad426d9bacd714ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 42,             \
+                 0x2456a136cdd66b8aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 43,             \
+                 0x122b509b66eb35c5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 44,             \
+                 0x8915a84db3759ae2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 45,             \
+                 0x448ad426d9bacd71ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 46,             \
+                 0xa2456a136cdd66b8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 47,             \
+                 0x5122b509b66eb35cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 48,             \
+                 0x28915a84db3759aeULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 49,             \
+                 0x1448ad426d9bacd7ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 50,             \
+                 0x8a2456a136cdd66bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 51,             \
+                 0xc5122b509b66eb35ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 52,             \
+                 0xe28915a84db3759aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 53,             \
+                 0x71448ad426d9bacdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 54,             \
+                 0xb8a2456a136cdd66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 55,             \
+                 0x5c5122b509b66eb3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 56,             \
+                 0xae28915a84db3759ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 57,             \
+                 0xd71448ad426d9bacULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 58,             \
+                 0x6b8a2456a136cdd6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 59,             \
+                 0x35c5122b509b66ebULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 60,             \
+                 0x9ae28915a84db375ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 61,             \
+                 0xcd71448ad426d9baULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 62,             \
+                 0x66b8a2456a136cddULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 63,             \
+                 0xb35c5122b509b66eULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 64,             \
+                 0x59ae28915a84db37ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 65,             \
+                 0xacd71448ad426d9bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 66,             \
+                 0xd66b8a2456a136cdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 67,             \
+                 0xeb35c5122b509b66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 68,             \
+                 0x759ae28915a84db3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 69,             \
+                 0xbacd71448ad426d9ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 70,             \
+                 0xdd66b8a2456a136cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 71,             \
+                 0x6eb35c5122b509b6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 72,             \
+                 0x3759ae28915a84dbULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 73,             \
+                 0x9bacd71448ad426dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 74,             \
+                 0xcdd66b8a2456a136ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 75,             \
+                 0x66eb35c5122b509bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 76,             \
+                 0xb3759ae28915a84dULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 77,             \
+                 0xd9bacd71448ad426ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 78,             \
+                 0x6cdd66b8a2456a13ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 79,             \
+                 0xb66eb35c5122b509ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 80,             \
+                 0xdb3759ae28915a84ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 81,             \
+                 0x6d9bacd71448ad42ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 82,             \
+                 0x36cdd66b8a2456a1ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 83,             \
+                 0x9b66eb35c5122b50ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 84,             \
+                 0x4db3759ae28915a8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 85,             \
+                 0x26d9bacd71448ad4ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 86,             \
+                 0x136cdd66b8a2456aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 87,             \
+                 0x09b66eb35c5122b5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 88,             \
+                 0x84db3759ae28915aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 89,             \
+                 0x426d9bacd71448adULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 90,             \
+                 0xa136cdd66b8a2456ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 91,             \
+                 0x509b66eb35c5122bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 92,             \
+                 0xa84db3759ae28915ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 93,             \
+                 0xd426d9bacd71448aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 94,             \
+                 0x6a136cdd66b8a245ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 95,             \
+                 0xb509b66eb35c5122ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 96,             \
+                 0x5a84db3759ae2891ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 97,             \
+                 0xad426d9bacd71448ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 98,             \
+                 0x56a136cdd66b8a24ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 99,             \
+                 0x2b509b66eb35c512ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 100,            \
+                 0x15a84db3759ae289ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 101,            \
+                 0x8ad426d9bacd7144ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 102,            \
+                 0x456a136cdd66b8a2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 103,            \
+                 0x22b509b66eb35c51ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 104,            \
+                 0x915a84db3759ae28ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 105,            \
+                 0x48ad426d9bacd714ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 106,            \
+                 0x2456a136cdd66b8aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 107,            \
+                 0x122b509b66eb35c5ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 108,            \
+                 0x8915a84db3759ae2ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 109,            \
+                 0x448ad426d9bacd71ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 110,            \
+                 0xa2456a136cdd66b8ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 111,            \
+                 0x5122b509b66eb35cULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 112,            \
+                 0x28915a84db3759aeULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 113,            \
+                 0x1448ad426d9bacd7ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 114,            \
+                 0x8a2456a136cdd66bULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 115,            \
+                 0xc5122b509b66eb35ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 116,            \
+                 0xe28915a84db3759aULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 117,            \
+                 0x71448ad426d9bacdULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 118,            \
+                 0xb8a2456a136cdd66ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 119,            \
+                 0x5c5122b509b66eb3ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 120,            \
+                 0xae28915a84db3759ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 121,            \
+                 0xd71448ad426d9bacULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 122,            \
+                 0x6b8a2456a136cdd6ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 123,            \
+                 0x35c5122b509b66ebULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 124,            \
+                 0x9ae28915a84db375ULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 125,            \
+                 0xcd71448ad426d9baULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 126,            \
+                 0x66b8a2456a136cddULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 127,            \
+                 0xb35c5122b509b66eULL);                                \
+      TEST_CASE (type, function, 0x59ae28915a84db37ULL, 128,            \
+                 0x59ae28915a84db37ULL);                                \
+    }                                                                   \
+  while (false)
+
+static void
+test_stdc_rotate_right_ul (void)
+{
+  if (sizeof 0ul < sizeof 0ull)
+    TEST_CASES_32 (unsigned long int, stdc_rotate_right_ul);
+  else
+    TEST_CASES_64 (unsigned long int, stdc_rotate_right_ul);
+}
+
+static void
+test_stdc_rotate_right_ull (void)
+{
+  TEST_CASES_64 (unsigned long long int, stdc_rotate_right_ull);
+}
+
+int
+main (void)
+{
+  test_stdc_rotate_right_uc ();
+  test_stdc_rotate_right_us ();
+  test_stdc_rotate_right_ui ();
+  test_stdc_rotate_right_ul ();
+  test_stdc_rotate_right_ull ();
+  return test_exit_status;
+}
-- 
2.53.0

Reply via email to