]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Require fstack_protector for no-stack-protector-attr-3.C
authorDimitar Dimitrov <dimitar@dinux.eu>
Wed, 12 Mar 2025 20:22:45 +0000 (22:22 +0200)
committerDimitar Dimitrov <dimitar@dinux.eu>
Wed, 23 Apr 2025 18:35:05 +0000 (21:35 +0300)
The test fails on pru-unknown-elf with:
   cc1plus: warning: '-fstack-protector' not supported for this target

Even though the compiled functions have the feature disabled using an
attribute, the command line option is still not supported by some targets.

Tested x86_64-pc-linux-gnu and ensured that g++.sum is the same with and
without this patch.

gcc/testsuite/ChangeLog:

* g++.dg/no-stack-protector-attr-3.C: Require effective target
fstack_protector.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
gcc/testsuite/g++.dg/no-stack-protector-attr-3.C

index 147c2b79f780b6fda2f22a04f03ba6ed924d4d5b..b858d706bb57a0aa6f8427bcaa5c41466c3b481a 100644 (file)
@@ -6,6 +6,7 @@
 /* { dg-additional-options "-fno-PIE" { target ia32 } } */
 
 /* { dg-do compile { target { ! hppa*-*-* } } } */
+/* { dg-require-effective-target fstack_protector } */
 
 int __attribute__((no_stack_protector)) foo()
 {