Jeff Law <l...@redhat.com> writes:

> On 05/14/2013 04:31 AM, Jakub Jelinek wrote:
>> On Tue, May 14, 2013 at 12:26:31PM +0200, Rainer Orth wrote:
>>> Tested with the appropriate runtest invocations on i386-pc-solaris2.11
>>> and x86_64-unknown-linux-gnu, installed on mainline.
>>
>> I'd say the test should just use __builtin_alloca instead.
> Yea, let's go with that.  OK with that fix.  I

Here's what I installed, tested as before:

2013-05-14  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * gcc.dg/fstack-protector-strong.c: Don't include <stdlib.h>.
        (alloca): Remove declaration.
        (foo9): Replace alloca by __builtin_alloca.

changeset:   7864:f9b5472f0ad7
tag:         tip
user:        Rainer Orth <r...@cebitec.uni-bielefeld.de>
date:        Tue May 14 15:10:31 2013 +0200
summary:     Use __builtin_alloca in gcc.dg/fstack-protector-strong.c

diff --git a/gcc/testsuite/gcc.dg/fstack-protector-strong.c b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
--- 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));
 }
 

> Ranier, if you run into others, they're pre-approved to be fixed this way
> as well.

The one above is the only one that currently fails on Solaris.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to