public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug testsuite/102910] cf-descriptor-5-c.c fails to build
Date: Sun, 24 Oct 2021 20:59:53 +0000	[thread overview]
Message-ID: <bug-102910-4-BxULM6yndp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102910-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102910

--- Comment #6 from kargl at gcc dot gnu.org ---
(In reply to David Edelsohn from comment #5)
> Previously the test case was unresolved because it referenced alloca without
> a declaration.
> 
> char *adata = (char *) alloca (n);
> 
> If you want to call __builtin_alloca() because this is a testcase for GCC,
> which provides __builtin_alloca(), fine.  You should call it directly and
> not alloca().
> 
> If you want to call alloca(), then you need logic for the different systems
> that declare alloca() in different header files.
> 
> #ifdef alloca
> 
> is wrong because it makes the testcase system dependent and tests different
> behavior.

It seems you broke it with

% git blame gcc/testsuite/gfortran.dg/c-interop/cf-descriptor-5-c.c
cb17b5054118 (Sandra Loosemore  2021-06-30 20:03:27 -0700  1) #include
<stdlib.h
>
cb17b5054118 (Sandra Loosemore  2021-06-30 20:03:27 -0700  2) #include
<stdio.h>
000000000000 (Not Committed Yet 2021-10-24 13:54:29 -0700  3) #ifndef alloca
f1408388f2e2 (David Edelsohn    2021-09-30 16:43:58 -0400  4) #include
<alloca.h
>
000000000000 (Not Committed Yet 2021-10-24 13:54:29 -0700  5) #endif

Shouldn't the person who broke the testcase fix it?  Or, is it okay
for anyone to commit an unreviewed knowingly broken "fix" to paper over
a failure on whatever target they are working on?

  parent reply	other threads:[~2021-10-24 20:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23 23:20 [Bug fortran/102910] New: " kargl at gcc dot gnu.org
2021-10-23 23:21 ` [Bug fortran/102910] " kargl at gcc dot gnu.org
2021-10-23 23:31 ` kargl at gcc dot gnu.org
2021-10-24  5:28 ` [Bug testsuite/102910] " pinskia at gcc dot gnu.org
2021-10-24 18:34 ` sgk at troutmask dot apl.washington.edu
2021-10-24 18:39 ` kargl at gcc dot gnu.org
2021-10-24 19:31 ` dje at gcc dot gnu.org
2021-10-24 20:59 ` kargl at gcc dot gnu.org [this message]
2021-10-24 21:35 ` dje at gcc dot gnu.org
2021-10-25 10:08 ` burnus at gcc dot gnu.org
2021-10-25 17:05 ` sandra at gcc dot gnu.org
2021-10-25 17:53 ` sgk at troutmask dot apl.washington.edu
2021-10-25 18:33 ` sandra at gcc dot gnu.org
2021-10-25 18:48 ` cvs-commit at gcc dot gnu.org
2021-10-26 14:25 ` cvs-commit at gcc dot gnu.org
2021-10-26 14:26 ` sandra at gcc dot gnu.org
2021-10-26 16:40 ` kargl at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102910-4-BxULM6yndp@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).