public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/105783] -Wanalyzer-null-dereference false positive with union and functions
Date: Fri, 07 Oct 2022 16:44:01 +0000	[thread overview]
Message-ID: <bug-105783-4-T6SuTfabCm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105783-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

https://gcc.gnu.org/g:f09b99550a3c6cd16f5e9150ebd4b1d87033dcbd

commit r13-3168-gf09b99550a3c6cd16f5e9150ebd4b1d87033dcbd
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Fri Oct 7 12:41:59 2022 -0400

    analyzer: extract bits from integer constants [PR105783]

    Fix a false positive from -Wanalyzer-null-dereference due to -fanalyzer
    failing to grok the value of a particular boolean field initialized to a
    constant.

    gcc/analyzer/ChangeLog:
            PR analyzer/105783
            * region-model.cc (selftest::get_bit): New function.
            (selftest::test_bits_within_svalue_folding): New.
            (selfftest::analyzer_region_model_cc_tests): Call it.
            * svalue.cc (constant_svalue::maybe_fold_bits_within): Handle the
            case of extracting a single bit.

    gcc/testsuite/ChangeLog:
            PR analyzer/105783
            * gcc.dg/analyzer/pr105783.c: New test.

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

  parent reply	other threads:[~2022-10-07 16:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31  1:45 [Bug analyzer/105783] New: " kamilcukrowski at gmail dot com
2022-10-06 21:04 ` [Bug analyzer/105783] " dmalcolm at gcc dot gnu.org
2022-10-07 16:44 ` cvs-commit at gcc dot gnu.org [this message]
2022-10-07 16:47 ` dmalcolm 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-105783-4-T6SuTfabCm@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).