diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2023-12-26 11:34:11 -0500 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 2023-12-26 11:38:30 -0500 |
commit | 9773ca519864e2e0706424b805c3314f1fbe7d10 (patch) | |
tree | b80ffd156c58af771629135e63a6c389946872ef /gcc | |
parent | 87dfd70723385486645de3b8c93fa1e19143fa46 (diff) | |
download | gcc-9773ca519864e2e0706424b805c3314f1fbe7d10.zip gcc-9773ca519864e2e0706424b805c3314f1fbe7d10.tar.gz gcc-9773ca519864e2e0706424b805c3314f1fbe7d10.tar.bz2 |
testsuite: Disable strub on AIX.
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>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/strub-unsupported-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/strub-unsupported-3.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/strub-unsupported.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 4 |
4 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/strub-unsupported-2.c b/gcc/testsuite/c-c++-common/strub-unsupported-2.c index 3586f4f..321a7e1 100644 --- a/gcc/testsuite/c-c++-common/strub-unsupported-2.c +++ b/gcc/testsuite/c-c++-common/strub-unsupported-2.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/strub-unsupported-3.c b/gcc/testsuite/c-c++-common/strub-unsupported-3.c index d6fb4c5..2de0fa1 100644 --- a/gcc/testsuite/c-c++-common/strub-unsupported-3.c +++ b/gcc/testsuite/c-c++-common/strub-unsupported-3.c @@ -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 diff --git a/gcc/testsuite/c-c++-common/strub-unsupported.c b/gcc/testsuite/c-c++-common/strub-unsupported.c index cb5c404..5fce49e 100644 --- a/gcc/testsuite/c-c++-common/strub-unsupported.c +++ b/gcc/testsuite/c-c++-common/strub-unsupported.c @@ -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 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 05fc417..167e630 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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) {} } ""] |