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/101721] [12 Regression] ICE in DECL_FUNCTION_CODE, at tree.h:4006
Date: Tue, 03 Aug 2021 10:45:04 +0000	[thread overview]
Message-ID: <bug-101721-4-12E1D8RQMD@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101721-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1a830c0636472e47a7503a5ed879725149e2e728

commit r12-2685-g1a830c0636472e47a7503a5ed879725149e2e728
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Aug 3 12:44:17 2021 +0200

    analyzer: Fix ICE on MD builtin [PR101721]

    The following testcase ICEs because DECL_FUNCTION_CODE asserts the builtin
    is BUILT_IN_NORMAL, but it sees a backend (MD) builtin instead.
    The FE, normal and MD builtin numbers overlap, so one should always
    check what kind of builtin it is before looking at specific codes.

    On the other side, region-model.cc has:
          if (fndecl_built_in_p (callee_fndecl, BUILT_IN_NORMAL)
              && gimple_builtin_call_types_compatible_p (call, callee_fndecl))
            switch (DECL_UNCHECKED_FUNCTION_CODE (callee_fndecl))
    which IMO should use DECL_FUNCTION_CODE instead, it checked first it is
    a normal builtin...

    2021-08-03  Jakub Jelinek  <jakub@redhat.com>

            PR analyzer/101721
            * sm-malloc.cc (known_allocator_p): Only check DECL_FUNCTION_CODE
on
            BUILT_IN_NORMAL builtins.

            * gcc.dg/analyzer/pr101721.c: New test.

  parent reply	other threads:[~2021-08-03 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 10:17 [Bug analyzer/101721] New: " asolokha at gmx dot com
2021-08-02 12:22 ` [Bug analyzer/101721] " rguenth at gcc dot gnu.org
2021-08-02 15:45 ` jakub at gcc dot gnu.org
2021-08-02 15:55 ` jakub at gcc dot gnu.org
2021-08-03 10:45 ` cvs-commit at gcc dot gnu.org [this message]
2021-08-03 10:51 ` jakub 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-101721-4-12E1D8RQMD@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).