]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Disable strub on AIX.
authorDavid Edelsohn <dje.gcc@gmail.com>
Tue, 26 Dec 2023 16:34:11 +0000 (11:34 -0500)
committerDavid Edelsohn <dje.gcc@gmail.com>
Tue, 26 Dec 2023 16:38:30 +0000 (11:38 -0500)
AIX does not support stack scrubbing. Set strub as unsupported on AIX
and ensure that testcases check for strub support.

gcc/testsuite/ChangeLog:
* c-c++-common/strub-unsupported-2.c: Require strub.
* c-c++-common/strub-unsupported-3.c: Same.
* c-c++-common/strub-unsupported.c: Same.
* lib/target-supports.exp (check_effective_target_strub): Return 0
for AIX.

Signed-off-by: David Edelsohn <dje.gcc@gmail.com>
gcc/testsuite/c-c++-common/strub-unsupported-2.c
gcc/testsuite/c-c++-common/strub-unsupported-3.c
gcc/testsuite/c-c++-common/strub-unsupported.c
gcc/testsuite/lib/target-supports.exp

index 3586f4f679dfee282b96a88b8ba492b2effb8ca5..321a7e12a8a5ecfde425867b73f3682c9b592c18 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target strub } */
 
 /* Check that, when strub is not supported (so no dg-required-effective-target
    strub above), we report when pointers to strub functions are called.  This
index d6fb4c525c4a6ae6fb676d04e490d37f46b2cfd2..2de0fa1ad6404fa57d142dbe91c763ce668a1842 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target strub } */
 
 /* Check that, when strub is not supported (so no dg-required-effective-target
    strub above), we report when strub functions that are not defined are
index cb5c4049495c426bf86439bcbe11feaffdb6b33f..5fce49e8275fde0aa7031f5e17437c564ec15283 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target strub } */
 
 /* Check that, when strub is not supported (so no dg-required-effective-target
    strub above), we report when strub functions are defined, and when they're
index 05fc417877bcd658931061b7245eb8ba5abd2e09..167e630f5a5fbe07407a26468da5c33ecaeeff4b 100644 (file)
@@ -1304,6 +1304,10 @@ proc check_stack_check_available { stack_kind } {
 
 # Return 1 if the target supports stack scrubbing.
 proc check_effective_target_strub {} {
+    # strub is not supported on AIX.
+    if { [istarget powerpc*-*-aix*] } {
+       return 0
+    }
     return [check_no_compiler_messages strub assembly {
        void __attribute__ ((__strub__)) fn (void) {}
     } ""]