diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2023-12-06 15:38:50 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2023-12-06 15:38:50 +0000 |
commit | 458e7c937924bbcef80eb006af0b61420dbfc1c1 (patch) | |
tree | 971c857f36b3678ab5a1ce70f556d69eee46b34e /gcc | |
parent | c9d5b46a25547035e381b0246de5cb553ca8b02d (diff) | |
download | gcc-458e7c937924bbcef80eb006af0b61420dbfc1c1.zip gcc-458e7c937924bbcef80eb006af0b61420dbfc1c1.tar.gz gcc-458e7c937924bbcef80eb006af0b61420dbfc1c1.tar.bz2 |
Fix c-c++-common/fhardened-[12].c test fails on hppa
The -fstack-protector and -fstack-protector-strong options are
not supported on hppa since the stack grows up.
2023-12-06 John David Anglin <danglin@gcc.gnu.org>
gcc/testsuite/ChangeLog:
* c-c++-common/fhardened-1.c: Ignore __SSP_STRONG__ define
if __hppa__ is defined.
* c-c++-common/fhardened-2.c: Ignore __SSP__ define
if __hppa__ is defined.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/fhardened-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/fhardened-2.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/c-c++-common/fhardened-1.c b/gcc/testsuite/c-c++-common/fhardened-1.c index 7e67406..23478be 100644 --- a/gcc/testsuite/c-c++-common/fhardened-1.c +++ b/gcc/testsuite/c-c++-common/fhardened-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-fhardened -O" } */ -#ifndef __SSP_STRONG__ +#if !defined(__SSP_STRONG__) && !defined(__hppa__) # error "-fstack-protector-strong not enabled" #endif diff --git a/gcc/testsuite/c-c++-common/fhardened-2.c b/gcc/testsuite/c-c++-common/fhardened-2.c index 280ff96..6ac66f9 100644 --- a/gcc/testsuite/c-c++-common/fhardened-2.c +++ b/gcc/testsuite/c-c++-common/fhardened-2.c @@ -4,7 +4,7 @@ #ifdef __SSP_STRONG__ # error "-fstack-protector-strong enabled when it should not be" #endif -#ifndef __SSP__ +#if !defined(__SSP__) && !defined(__hppa__) # error "-fstack-protector not enabled" #endif |