[PATCH 21/39] debug: Avoid clang optimize away required function on tst-ssp1.c
H.J. Lu
hjl.tools@gmail.com
Sun Dec 22 00:04:44 GMT 2024
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
---
debug/tst-ssp-1.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/debug/tst-ssp-1.c b/debug/tst-ssp-1.c
index 27f10edc56..671e9a5007 100644
--- a/debug/tst-ssp-1.c
+++ b/debug/tst-ssp-1.c
@@ -22,6 +22,10 @@
static void
__attribute__ ((noinline)) __attribute_noclone__
+#ifdef __clang__
+/* Avoid clang optimize it away. */
+__attribute__ ((optnone))
+#endif
test (char *foo)
{
int i;
--
2.47.1
More information about the Libc-alpha
mailing list