The new gcc.dg/fstack-protector-strong.c testcase is currently failing
on Solaris/x86 like this:

FAIL: gcc.dg/fstack-protector-strong.c (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/fstack-protector-strong.c:113:13:
 warning: incompatible implicit declaration of built-in function 'alloca' 
[enabled by default]

Matching other testcases that use alloca, I've fixed it by explicitly
declaring alloca.

Tested with the appropriate runtest invocations on i386-pc-solaris2.11
and x86_64-unknown-linux-gnu, installed on mainline.

        Rainer


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

        * gcc.dg/fstack-protector-strong.c (alloca): Declare.

# HG changeset patch
# Parent 677b6b866a10b42d04929883383fbf70e152c598
 Fix gcc.dg/fstack-protector-strong.c on Solaris/x86

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
@@ -6,6 +6,8 @@
 #include<string.h>
 #include<stdlib.h>
 
+extern void *alloca(__SIZE_TYPE__);
+
 extern int g0;
 extern int* pg0;
 int
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to