public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: NightStrike <nightstrike@gmail.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [pushed] analyzer: fix uses of alloca in testsuite
Date: Wed, 1 Feb 2023 20:02:13 -0500	[thread overview]
Message-ID: <CAF1jjLvq+wpss=2xbXz6-U80v8DP9K5BLUbL4HmWogHF-YsDuw@mail.gmail.com> (raw)
In-Reply-To: <20230201022755.825041-1-dmalcolm@redhat.com>

On Tue, Jan 31, 2023 at 9:27 PM David Malcolm <dmalcolm@redhat.com> wrote:
>
> Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
> Pushed to trunk as r13-5615-gd03ae4be2c6d48.
>
> gcc/testsuite/ChangeLog:
>         * gcc.dg/analyzer/call-summaries-2.c: Add
>         dg-require-effective-target alloca.
>         * gcc.dg/analyzer/imprecise-floating-point-1.c: Likewise.
>         * gcc.dg/analyzer/infinite-recursion-alloca.c: Likewise.
>         * gcc.dg/analyzer/malloc-callbacks.c: Likewise.
>         * gcc.dg/analyzer/out-of-bounds-5.c: Likewise.  Remove includes
>         of <stdio.h> and <alloca.h>.  Use "__builtin_free" rather than
>         "free", to match uses of "__builtin_malloc".
>         * gcc.dg/analyzer/putenv-1.c: Add dg-require-effective-target
>         alloca.
>         * gcc.dg/analyzer/write-to-string-literal-5.c: Likewise.

Thanks for this fix, these all pass now on Windows.

I hope I'm not being pedantic, but there's still a remaining
inconsistency in that some parts of the test use memcpy (like test6),
and others use __builtin_memcpy (like test98).  There isn't a call to
__builtin_memset(), but there is a call to memset().  Maybe these
differences are intentional, though.  If they aren't, and you wanted
to reduce it further, you could remove string.h and use the builtins.
You could also include stddef.h instead of stdlib.h, if all you need
is size_t.

      reply	other threads:[~2023-02-02  1:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22c944dff18fc7afeb9c8acd1d1e5d05e2cc6312.camel@redhat.com>
2023-02-01  2:27 ` David Malcolm
2023-02-02  1:02   ` NightStrike [this message]

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='CAF1jjLvq+wpss=2xbXz6-U80v8DP9K5BLUbL4HmWogHF-YsDuw@mail.gmail.com' \
    --to=nightstrike@gmail.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@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).