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>
This commit is contained in:
Adhemerval Zanella 2022-03-24 15:54:10 -03:00 committed by H.J. Lu
parent a69a0bb619
commit d085db5b57

View File

@ -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 ();