public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
Cc: Gcc Patch List <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>,     Jeff Law <law@redhat.com>,
	Florian Weimer <fweimer@redhat.com>
Subject: Re: PR middle-end/16351 NULL dereference warnings
Date: Wed, 05 Aug 2015 11:37:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.11.1508051336590.19642@zhemvz.fhfr.qr> (raw)
In-Reply-To: <CAESRpQCFW8hv_CL6mji=UKc8imHKr0WNYMW9uuN7ZzGzCrTbtQ@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2975 bytes --]

On Mon, 3 Aug 2015, Manuel López-Ibáñez wrote:

> PING: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01860.html
> 
> Actually, the xfailed test was because the function folded to nothing
> and the offending code was removed without warning. Fixed in the
> attached version. Same changelog.

Ok.

Thanks,
Richard.

> 
> 
> On 22 July 2015 at 17:52, Manuel López-Ibáñez <lopezibanez@gmail.com> wrote:
> > I took the patch in
> > https://gcc.gnu.org/ml/gcc-patches/2014-01/msg01715.html and removed
> > the Wnull-attribute part, since most of it can be done from the FE as
> > shown in https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01857.html  and
> > also to make the patch smaller and easier to review.
> >
> > I also fixed the comments by Florian here:
> > https://gcc.gnu.org/ml/gcc-patches/2014-02/msg00149.html and added
> > more tests from the PR and its duplicates (one xfailed, I'll open a
> > new PR about it).
> >
> > Futher cleanups may be possible (infer_nonnull_range_by_attribute
> > checks flag_delete_null_pointer_checks, which seems weird to me but it
> > matches the existing behavior of infer_nonnull_range).
> >
> > I added this to Wall to get as much testing as possible, we can always
> > move it to Wextra or disable it by default just before the release if
> > it turns out to be too noisy.
> >
> > Boostrapped and regression tested on x86_64-linux-gnu.
> >
> > OK?
> >
> > gcc/ChangeLog:
> >
> > 2015-07-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
> >         Jeff Law  <law@redhat.com>
> >
> >     PR c/16351
> >     * doc/invoke.texi (Wnull-dereference): New.
> >     * tree-vrp.c (infer_value_range): Update call to infer_nonnull_range.
> >     * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behaviour):
> >     Warn for potential NULL dereferences.
> >     (find_explicit_erroneous_behaviour): Warn for NULL dereferences.
> >     * ubsan.c (instrument_nonnull_arg): Call
> >     infer_nonnull_range_by_attribute.
> >     (instrument_nonnull_return): Likewise.
> >     * common.opt (Wnull-dereference); New.
> >     * gimple.c (infer_nonnull_range): Remove bool arguments.
> >     (infer_nonnull_range_by_dereference): New.
> >     (infer_nonnull_range_by_attribute): New.
> >     * gimple.h: Update declarations.
> >
> > gcc/testsuite/ChangeLog:
> >
> > 2015-07-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
> >         Jeff Law  <law@redhat.com>
> >
> >     PR c/16351
> >     * gcc.dg/tree-ssa/isolate-2.c: Close comment.
> >     * gcc.dg/tree-ssa/isolate-4.c: Likewise.
> >     * gcc.dg/tree-ssa/wnull-dereference.c: New test.
> >     * gcc.dg/tree-ssa/isolate-1.c: Test warnings with -Wnull-dereference.
> >     * gcc.dg/tree-ssa/isolate-3.c: Likewise.
> >     * gcc.dg/tree-ssa/isolate-5.c: Likewise.
> >     * c-c++-common/wnonnull-1.c: New test.
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)

      reply	other threads:[~2015-08-05 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 16:01 Manuel López-Ibáñez
2015-08-03 18:45 ` Manuel López-Ibáñez
2015-08-05 11:37   ` Richard Biener [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=alpine.LSU.2.11.1508051336590.19642@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=lopezibanez@gmail.com \
    /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).