Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-3137-g30d6356773a838.

gcc/analyzer/ChangeLog:
        * call-summary.cc (call_summary_replay::dump_to_pp): Bulletproof
        against NULL caller regions/svalues.

Signed-off-by: David Malcolm <dmalc...@redhat.com>
---
 gcc/analyzer/call-summary.cc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gcc/analyzer/call-summary.cc b/gcc/analyzer/call-summary.cc
index bc50562b5ec..12ef82d18d6 100644
--- a/gcc/analyzer/call-summary.cc
+++ b/gcc/analyzer/call-summary.cc
@@ -845,14 +845,20 @@ call_summary_replay::dump_to_pp (pretty_printer *pp, bool 
simple) const
   for (auto summary_reg : summary_regs)
     {
       pp_string (pp, "reg in summary: ");
-      summary_reg->dump_to_pp (pp, simple);
+      if (summary_reg)
+       summary_reg->dump_to_pp (pp, simple);
+      else
+       pp_string (pp, "(null)");
       pp_newline (pp);
 
       const region *caller_reg
        = *((const_cast<region_map_t &>
             (m_map_region_from_summary_to_caller)).get (summary_reg));
       pp_string (pp, " reg in caller: ");
-      caller_reg->dump_to_pp (pp, simple);
+      if (caller_reg)
+       caller_reg->dump_to_pp (pp, simple);
+      else
+       pp_string (pp, "(null)");
       pp_newline (pp);
     }
 }
-- 
2.26.3

Reply via email to