This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix gcc.dg/shrink-wrap-alloca.c


The new gcc.dg/shrink-wrap-alloca.c FAILs on 64-bit Solaris 10/x86:

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c:4:14: warning: conflicting types for built-in function 'alloca' [enabled by default]

The following patch fixes it by using __builtin_alloca, as pre-approved
by Jeff.

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

	Rainer


2013-05-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* gcc.dg/shrink-wrap-alloca.c: Use __builtin_alloca.

# HG changeset patch
# Parent aa3c5278ae7a82849942b6f47fc69ee62b244660
Fix gcc.dg/shrink-wrap-alloca.c

diff --git a/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c b/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c
--- a/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c
+++ b/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c
@@ -1,13 +1,11 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -g" } */
 
-extern int * alloca (int);
-
 int *p;
 
 void
 test (int a)
 {
   if (a > 0)
-    p = alloca (4);
+    p = __builtin_alloca (4);
 }
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]