aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2013-05-14 13:11:25 +0000
committerRainer Orth <ro@gcc.gnu.org>2013-05-14 13:11:25 +0000
commitdd787b0c00f8c10239b08685826946433fc40f22 (patch)
tree165aad51133fca848e8c27a1a00a970c57fab08c
parent1a2887689b95dd72960b429650eb2b4c0b1fdcd0 (diff)
downloadgcc-dd787b0c00f8c10239b08685826946433fc40f22.zip
gcc-dd787b0c00f8c10239b08685826946433fc40f22.tar.gz
gcc-dd787b0c00f8c10239b08685826946433fc40f22.tar.bz2
Use __builtin_alloca in gcc.dg/fstack-protector-strong.c
* gcc.dg/fstack-protector-strong.c: Don't include <stdlib.h>. (alloca): Remove declaration. (foo9): Replace alloca by __builtin_alloca. From-SVN: r198883
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/fstack-protector-strong.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 410739b..966280a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/fstack-protector-strong.c: Don't include <stdlib.h>.
+ (alloca): Remove declaration.
+ (foo9): Replace alloca by __builtin_alloca.
+
2013-05-14 Joern Rennecke <joern.rennecke@embecosm.com>
* testsuite/gcc.c-torture/compile/limits-externdecl.c [target avr-*-*]:
diff --git a/gcc/testsuite/gcc.dg/fstack-protector-strong.c b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
index 6d5dd0f..7c232ff 100644
--- a/gcc/testsuite/gcc.dg/fstack-protector-strong.c
+++ b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
@@ -4,9 +4,6 @@
/* { dg-options "-O2 -fstack-protector-strong" } */
#include<string.h>
-#include<stdlib.h>
-
-extern void *alloca(__SIZE_TYPE__);
extern int g0;
extern int* pg0;
@@ -112,7 +109,7 @@ foo8 ()
int
foo9 ()
{
- char* p = alloca (100);
+ char* p = __builtin_alloca (100);
return goo ((int *)(p + 50));
}