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 <dmalc...@gcc.gnu.org>: https://gcc.gnu.org/g:0677759f753d321bde52d7343227f842b7e759d2 commit r11-6527-g0677759f753d321bde52d7343227f842b7e759d2 Author: David Malcolm <dmalc...@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.