aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2020-01-08 15:53:16 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2020-01-08 15:53:16 +0000
commit80d803aefb82f336abd3ff421c1a7edcbd24c9ae (patch)
tree5b3b78aefaa861da6e4a5e9d2ff4ecd7f0d57c7c
parent3629ff8ad6b73b35f4168df465f47f5a302691e2 (diff)
downloadgcc-80d803aefb82f336abd3ff421c1a7edcbd24c9ae.zip
gcc-80d803aefb82f336abd3ff421c1a7edcbd24c9ae.tar.gz
gcc-80d803aefb82f336abd3ff421c1a7edcbd24c9ae.tar.bz2
relax aarch64 stack-clash tests depedence on alloca.h
2020-01-06 Olivier Hainque <hainque@adacore.com> Alexandre Oliva <oliva@adacore.com> * gcc.target/aarch64/stack-check-alloca.h: Remove #include alloca.h. #define alloca __builtin_alloca instead. * gcc.target/aarch64/stack-check-alloca-1.c: Add { dg-require-effective-target alloca }. * gcc.target/aarch64/stack-check-alloca-2.c: Likewise. * gcc.target/aarch64/stack-check-alloca-3.c: Likewise. * gcc.target/aarch64/stack-check-alloca-4.c: Likewise. * gcc.target/aarch64/stack-check-alloca-5.c: Likewise. * gcc.target/aarch64/stack-check-alloca-6.c: Likewise. * gcc.target/aarch64/stack-check-alloca-7.c: Likewise. * gcc.target/aarch64/stack-check-alloca-8.c: Likewise. * gcc.target/aarch64/stack-check-alloca-9.c: Likewise. * gcc.target/aarch64/stack-check-alloca-10.c: Likewise. Co-Authored-By: Alexandre Oliva <oliva@adacore.com> From-SVN: r280010
-rw-r--r--gcc/testsuite/ChangeLog18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-1.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-10.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-4.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-5.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-6.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-7.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-8.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca-9.c1
-rw-r--r--gcc/testsuite/gcc.target/aarch64/stack-check-alloca.h6
12 files changed, 32 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 972bb6d..63ba12d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,21 @@
+2020-01-08 Olivier Hainque <hainque@adacore.com>
+ Alexandre Oliva <oliva@adacore.com>
+
+ * gcc.target/aarch64/stack-check-alloca.h: Remove
+ #include alloca.h. #define alloca __builtin_alloca
+ instead.
+ * gcc.target/aarch64/stack-check-alloca-1.c: Add
+ { dg-require-effective-target alloca }.
+ * gcc.target/aarch64/stack-check-alloca-2.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-3.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-4.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-5.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-6.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-7.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-8.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-9.c: Likewise.
+ * gcc.target/aarch64/stack-check-alloca-10.c: Likewise.
+
2020-01-08 Martin Liska <mliska@suse.cz>
* gcc.dg/ipa/ipa-icf-1.c: Update expected scanned output.
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-1.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-1.c
index 7fc189f..e963ee6 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-1.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE y
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-10.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-10.c
index 7c42206..eb85843 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-10.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-10.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 127.5 * 64 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c
index 69fdd16..cc8216d 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-2.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 0
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c
index fba3a7a..f5e51fa 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-3.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 100
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-4.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-4.c
index d53f30a..c903f4d 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-4.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-4.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 2 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-5.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-5.c
index e0ff99f..691ec23 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-5.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-5.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 63 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-6.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-6.c
index c4bad9a..9e4af23 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-6.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-6.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 63.5 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-7.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-7.c
index cba9ff8..f0ce2d8 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-7.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-7.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 64 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-8.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-8.c
index 5a35411..caaab04 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-8.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-8.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 65 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-9.c b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-9.c
index 5773d80..2c42e85 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-9.c
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca-9.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
+/* { dg-require-effective-target alloca } */
#define SIZE 127 * 64 * 1024
#include "stack-check-alloca.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca.h b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca.h
index a4f7fa2..8c75f6c 100644
--- a/gcc/testsuite/gcc.target/aarch64/stack-check-alloca.h
+++ b/gcc/testsuite/gcc.target/aarch64/stack-check-alloca.h
@@ -1,4 +1,6 @@
-#include <alloca.h>
+
+/* Avoid inclusion of alloca.h, unavailable on some systems. */
+#define alloca __builtin_alloca
__attribute__((noinline, noipa))
void g (char* ptr, int y)
@@ -10,4 +12,4 @@ void f_caller (int y)
{
char* pStr = alloca(SIZE);
g (pStr, y);
-} \ No newline at end of file
+}