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/98580] ICE with -fanalyzer when LTO writes out error_mark_node for DECL_INITIAL
Date: Thu, 07 Jan 2021 20:46:33 +0000	[thread overview]
Message-ID: <bug-98580-4-fid1nCXHIe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98580-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 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:0677759f753d321bde52d7343227f842b7e759d2

commit r11-6527-g0677759f753d321bde52d7343227f842b7e759d2
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Jan 7 15:45:29 2021 -0500

    analyzer: fix ICE when DECL_INITIAL is error_mark_node [PR98580]

    lto-streamer-out.c's get_symbol_initial_value can return error_mark_node
    rather than DECL_INITIAL as an optimization to avoid extra sections for
    simple scalar values.

    Add a check to the analyzer to handle such cases gracefully.

    gcc/analyzer/ChangeLog:
            PR analyzer/98580
            * region.cc (decl_region::get_svalue_for_initializer): Gracefully
            handle when LTO writes out DECL_INITIAL as error_mark_node.

    gcc/testsuite/ChangeLog:
            PR analyzer/98580
            * gcc.dg/analyzer/pr98580-a.c: New test.
            * gcc.dg/analyzer/pr98580-b.c: New test.

  parent reply	other threads:[~2021-01-07 20:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 12:14 [Bug analyzer/98580] New: ICE with -fanalyzer and LTO: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p acoplan at gcc dot gnu.org
2021-01-07 13:25 ` [Bug analyzer/98580] ICE with -fanalyzer and LTO: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p since r11-2754-g623bc0276849d48a marxin at gcc dot gnu.org
2021-01-07 15:35 ` [Bug analyzer/98580] ICE with -fanalyzer when LTO writes out error_mark_node for DECL_INITIAL dmalcolm at gcc dot gnu.org
2021-01-07 20:46 ` cvs-commit at gcc dot gnu.org [this message]
2021-01-07 20:55 ` 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-98580-4-fid1nCXHIe@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).