From: David Edelsohn Date: Tue, 26 Dec 2023 16:34:11 +0000 (-0500) Subject: testsuite: Disable strub on AIX. X-Git-Tag: basepoints/gcc-15~3301 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9773ca519864e2e0706424b805c3314f1fbe7d10;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/c-c++-common/strub-unsupported-2.c b/gcc/testsuite/c-c++-common/strub-unsupported-2.c index 3586f4f679df..321a7e12a8a5 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 d6fb4c525c4a..2de0fa1ad640 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 cb5c4049495c..5fce49e8275f 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 05fc417877bc..167e630f5a5f 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) {} } ""]