This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[testsuite] Fix gcc.dg/fstack-protector-strong.c on Solaris/x86
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 May 2013 12:26:31 +0200
- Subject: [testsuite] Fix gcc.dg/fstack-protector-strong.c on Solaris/x86
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 <ro@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