aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-03-24 15:54:10 -0300
committerH.J. Lu <hjl.tools@gmail.com>2024-12-22 13:08:51 +0800
commitd085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4 (patch)
treeca5c95a4de83bf8a0c711d679f18a11bd1107d87
parenta69a0bb61975f5318d53da0a2c4e3fd5bcf7eeda (diff)
downloadglibc-d085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4.zip
glibc-d085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4.tar.gz
glibc-d085db5b57c71c3ee2fbfc38a4f7e2158abeb1d4.tar.bz2
tst-printf-bz18872.sh: stdio: Use __attribute__ ((optnone)) for Clang
Use __attribute__ ((optnone)) instead of __attribute__ ((optimize ("-O0"))) to disable optimization for Clang. Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
-rw-r--r--stdio-common/tst-printf-bz18872.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/stdio-common/tst-printf-bz18872.sh b/stdio-common/tst-printf-bz18872.sh
index 3b283f4..ade4b61 100644
--- a/stdio-common/tst-printf-bz18872.sh
+++ b/stdio-common/tst-printf-bz18872.sh
@@ -31,7 +31,11 @@ cat <<'EOF'
Compile do_test without optimization: GCC 4.9/5.0/6.0 takes a long time
to build this source. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67396 */
+#ifdef __clang__
+__attribute__ ((optnone))
+#else
__attribute__ ((optimize ("-O0")))
+#endif
int do_test (void)
{
mtrace ();