public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/pheeck/heads/sccp)] analyzer: Use __builtin_alloca in gcc.dg/analyzer/call-summaries-2.c
@ 2023-02-15 10:22 Filip Kastl
  0 siblings, 0 replies; only message in thread
From: Filip Kastl @ 2023-02-15 10:22 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3376448cee3e8f1c9b47c07886fe756c606f66b8

commit 3376448cee3e8f1c9b47c07886fe756c606f66b8
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Wed Nov 23 21:54:26 2022 +0100

    analyzer: Use __builtin_alloca in gcc.dg/analyzer/call-summaries-2.c
    
    gcc.dg/analyzer/call-summaries-2.c currently FAILs on Solaris:
    
    FAIL: gcc.dg/analyzer/call-summaries-2.c (test for excess errors)
    
    Excess errors:
    /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c:468:12:
    warning: implicit declaration of function 'alloca' [-Wimplicit-function-declaration]
    /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c:468:12:
    warning: incompatible implicit declaration of built-in function 'alloca' [-Wbuiltin-declaration-mismatch]
    
    alloca is only declared in <alloca.h>, which isn't included indirectly
    anywhere.  To avoid this, I switched the test to use __builtin_alloca
    instead, following the vast majority of analyzer tests that use alloca.
    
    Tested no i386-pc-solaris2.11, sparc-sun-solaris2.11, and
    x86_64-pc-linux-gnu.
    
    2022-11-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    
            gcc/testsuite:
            * gcc.dg/analyzer/call-summaries-2.c (uses_alloca): Use
            __builtin_alloca instead of alloca.

Diff:
---
 gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c b/gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c
index 85cece72b34..953cbd32f5a 100644
--- a/gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/call-summaries-2.c
@@ -465,7 +465,7 @@ int test_returns_external_result (void)
 
 int uses_alloca (int i)
 {
-  int *p = alloca (sizeof (int));
+  int *p = __builtin_alloca (sizeof (int));
   *p = i;
   return *p;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-15 10:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 10:22 [gcc(refs/users/pheeck/heads/sccp)] analyzer: Use __builtin_alloca in gcc.dg/analyzer/call-summaries-2.c Filip Kastl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).