The test safe-indirect-jump-3.c FAILs on powerpc64le-linux with the change
in jump table generation behavior with commit r15-4756-g06bc3a734e8890,
since it is compiled without optimization and expects jump tables to be
generated.  Add an explicit -fjump-tables to dg-options to get the old
behavior back.

Tested on powerpc64le-linux and verified it's fixed.

I pushed this as obvious, since it gives us back the old behavior the
test case was expecting and the test case is now immune from any future
changes in jump table generation behavior.  

Peter


2024-11-05  Peter Bergner  <berg...@linux.ibm.com>

gcc/testsuite/
        PR testsuite/117444
        * gcc.target/powerpc/safe-indirect-jump-3.c: Add -fjump-tables to
        dg-options.
---
 gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c 
b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c
index 87881fb18fc..f5a7100a9ff 100644
--- a/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mno-speculate-indirect-jumps" } */
+/* { dg-options "-fjump-tables -mno-speculate-indirect-jumps" } */
 /* { dg-warning "'-mno-speculate-indirect-jumps' is deprecated" "" { target 
*-*-* } 0 } */
 
 /* Test for deliberate misprediction of jump tables.  */
-- 
2.43.5

Reply via email to