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  <r...@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

Reply via email to