[glibc/azanella/clang] debug: Avoid clang optimize away required function on tst-ssp1.c
Adhemerval Zanella
azanella@sourceware.org
Fri Feb 9 17:39:07 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a29972e91b4ec18300af6db982308dcb11021128
commit a29972e91b4ec18300af6db982308dcb11021128
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Wed Jan 17 15:50:04 2024 -0300
debug: Avoid clang optimize away required function on tst-ssp1.c
Diff:
---
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;
More information about the Glibc-cvs
mailing list