If the toolchain is built with --enable-frame-pointer,
gcc.target/i386/no-callee-saved-16.c will not get the expected
optimization without -fomit-frame-pointer, that would be enabled by
-O2 without the configure flag.  Add it.

Regstrapped on x86_64-linux-gnu.  Also tested with gcc-14 on aarch64-,
arm-, x86-, and x86_64-vxworks7r2.  Ok to install?


for  gcc/testsuite/ChangeLog

        * gcc.target/i386/no-callee-saved-16.c: Add -fomit-frame-pointer.
---
 gcc/testsuite/gcc.target/i386/no-callee-saved-16.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/i386/no-callee-saved-16.c 
b/gcc/testsuite/gcc.target/i386/no-callee-saved-16.c
index 112d1764f3e10..a5589e21ab3b9 100644
--- a/gcc/testsuite/gcc.target/i386/no-callee-saved-16.c
+++ b/gcc/testsuite/gcc.target/i386/no-callee-saved-16.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune-ctrl=^prologue_using_move,^epilogue_using_move" } 
*/
+/* { dg-options "-O2 -fomit-frame-pointer 
-mtune-ctrl=^prologue_using_move,^epilogue_using_move" } */
 
 typedef void (*fn_t) (void) __attribute__ ((no_callee_saved_registers));
 


-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to