The new rop_ok effective target test doesn't correctly compute its expression
result.  Solution is to wrap the test within a expr {} statement.

This has been verified to work on both powerpc64le-linux and powerpc64-linux.
The original test case accidentally worked on LE, but failed on BE.  Now we
correctly run the rop tests on LE and mark them as UNSUPPORTED on BE.

Ok for trunk?

Peter

gcc/testsuite/
        PR target/103556
        PR target/103586
        * lib/target-supports.exp (check_effective_target_rop_ok): Use expr {}.

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 7956c387c55..50eef9d453b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6631,8 +6631,8 @@ proc check_effective_target_powerpc_elfv2 { } {
 # Return 1 if this is a PowerPC target supporting -mrop-protect
 
 proc check_effective_target_rop_ok { } {
-    return [check_effective_target_power10_ok]
-           && [check_effective_target_powerpc_elfv2]
+    return [expr { [check_effective_target_power10_ok]
+                  && [check_effective_target_powerpc_elfv2] }]
 }
 
 # The VxWorks SPARC simulator accepts only EM_SPARC executables and

Reply via email to