Fix this spurious error on targets without stack protection ability:
FAIL: gcc.dg/torture/pr124041.c -O0 (test for excess errors)
Excess errors:
cc1: warning: '-fstack-protector' not supported for this target
Ok for trunk? The test was added in stage 4, so I think it's reasonable
to fix now.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr124041.c: Require effective target
fstack_protector.
Cc: Robin Dapp <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
---
gcc/testsuite/gcc.dg/torture/pr124041.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/gcc.dg/torture/pr124041.c
b/gcc/testsuite/gcc.dg/torture/pr124041.c
index f966757e4b5..722363cbc9b 100644
--- a/gcc/testsuite/gcc.dg/torture/pr124041.c
+++ b/gcc/testsuite/gcc.dg/torture/pr124041.c
@@ -1,5 +1,6 @@
/* { dg-compile } */
/* { dg-additional-options "-O2 -fno-strict-aliasing -fstack-protector
-ftrivial-auto-var-init=zero -fsanitize=thread -Wall" } */
+/* { dg-require-effective-target fstack_protector } */
char *trick_compiler(void *);
int do_usercopy_stack_callee_i;
--
2.53.0