[PATCH] string: Drop always_inline from tst-xbzero-opt [BZ #23130]
Stian Halseth
stian@itx.no
Mon Sep 21 20:39:13 GMT 2026
Commit a066c5d7d keeps always_inline on prepare_test_buffer unless the
compiler lacks indirect_return, as a proxy for swapcontext not being
returns_twice. GCC has indirect_return on RISC-V, which uses the
generic bits/indirect-return.h, so the test asks to inline a caller of
a returns_twice function and fails to build:
tst-xbzero-opt.c:122:1: error: function 'prepare_test_buffer' can
never be inlined because it uses setjmp
Remove the attribute and the condition around it.
Tested on x86_64 and sparc64.
Reported-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Stian Halseth <stian@itx.no>
---
string/tst-xbzero-opt.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index 26e2ec1c13..dfe0d39879 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -111,14 +111,7 @@ use_test_buffer (unsigned char *buf)
/* Always check the test buffer immediately after filling it; this
makes externally visible side effects depend on the buffer existing
and having been filled in. */
-#if !__glibc_has_attribute (__indirect_return__)
-/* Without indirect_return, swapcontext is marked returns_twice, which
- prevents always_inline from working. */
-# define ALWAYS_INLINE
-#else
-# define ALWAYS_INLINE __attribute__ ((always_inline))
-#endif
-static inline ALWAYS_INLINE void
+static inline void
prepare_test_buffer (unsigned char *buf)
{
for (unsigned int i = 0; i < PATTERN_REPS; i++)
--
2.43.0
More information about the Libc-alpha
mailing list