]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use __builtin_alloca in gcc.dg/fstack-protector-strong.c
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 14 May 2013 13:11:25 +0000 (13:11 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 14 May 2013 13:11:25 +0000 (13:11 +0000)
* gcc.dg/fstack-protector-strong.c: Don't include <stdlib.h>.
(alloca): Remove declaration.
(foo9): Replace alloca by __builtin_alloca.

From-SVN: r198883

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fstack-protector-strong.c

index 410739b13f9d4a0ebe4a93e183c49563f30dadd8..966280ad9c2c543bf85deeab29d82f148a80a828 100644 (file)
@@ -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-*-*]:
index 6d5dd0f8c4b972235db892794f853e3ba2cd763f..7c232fff24377ce290dd829d0515ef8179135992 100644 (file)
@@ -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));
 }