From 7741164caa5691c32168a0d07c5804aeb20cd583 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Mon, 24 Jun 2019 15:06:47 -0400
Subject: [PATCH 40/51] FIXME: update analyzer for diagnostic_path
 formatting-option changes

---
 gcc/analyzer/impl-2.cc                             | 20 +++----
 gcc/analyzer/impl-3.cc                             | 18 +++----
 gcc/analyzer/impl-4.cc                             | 62 +++++++++++++---------
 .../NOT_FOR_UPSTREAM-CVE-2005-1689-krb5-recvauth.c |  4 +-
 .../gcc.dg/analyzer/analyzer-verbosity-0.c         |  2 +-
 .../gcc.dg/analyzer/analyzer-verbosity-1.c         |  2 +-
 .../gcc.dg/analyzer/analyzer-verbosity-2.c         |  2 +-
 gcc/testsuite/gcc.dg/analyzer/analyzer.exp         |  2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c      |  4 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c      |  2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c       |  2 +-
 .../gcc.dg/analyzer/malloc-ipa-8-unchecked.c       |  5 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c       |  2 +-
 gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c     |  2 -
 gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c     |  2 +-
 15 files changed, 70 insertions(+), 61 deletions(-)

diff --git a/gcc/analyzer/impl-2.cc b/gcc/analyzer/impl-2.cc
index 1f04787..413ed6e 100644
--- a/gcc/analyzer/impl-2.cc
+++ b/gcc/analyzer/impl-2.cc
@@ -546,7 +546,7 @@ public:
   std::string to_str () const
   {
     std::string result ("\"");
-    label_text event_desc (get_desc ());
+    label_text event_desc (get_desc (false));
     result += event_desc.m_buffer;
     event_desc.maybe_free ();
     result += "\" (";
@@ -570,7 +570,7 @@ public:
        pending_diagnostic::describe_critical_state_change;
        free_of_non_heap can use this to tweak the message.
        (Would be neater to simply capture this within the state).  */
-    label_text desc = get_desc ();
+    label_text desc = get_desc (false);
     desc.maybe_free ();
   }
 
@@ -596,7 +596,7 @@ public:
     free (m_desc);
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::borrow (m_desc);
   }
@@ -619,7 +619,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     pretty_printer pp;
     pp_string (&pp, "stmt: ");
@@ -644,7 +644,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::take (print ("entry to %qE", m_fndecl));
   }
@@ -676,7 +676,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     if (m_origin)
       return label_text::take
@@ -755,7 +755,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     switch (m_edge->m_kind)
       {
@@ -841,7 +841,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::take (print
 			     ("call summary: call to %qD from %qD",
@@ -883,7 +883,7 @@ public:
   }
   ~warning_event () { free (m_msg); }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::borrow (m_msg);
   }
@@ -915,7 +915,7 @@ public:
       {
 	if (i > 0)
 	  result += ", ";
-	label_text event_desc (e->get_desc ());
+	label_text event_desc (e->get_desc (false));
 	result += std::string ("\"") + event_desc.m_buffer + std::string ("\"");
 	event_desc.maybe_free ();
       }
diff --git a/gcc/analyzer/impl-3.cc b/gcc/analyzer/impl-3.cc
index 91b79ae..c16b6ef 100644
--- a/gcc/analyzer/impl-3.cc
+++ b/gcc/analyzer/impl-3.cc
@@ -196,7 +196,7 @@ public:
   std::string to_str () const
   {
     std::string result ("\"");
-    label_text event_desc (get_desc ());
+    label_text event_desc (get_desc (false));
     result += event_desc.m_buffer;
     event_desc.maybe_free ();
     result += "\" (depth ";
@@ -218,7 +218,7 @@ public:
        pending_diagnostic::describe_critical_state_change;
        free_of_non_heap can use this to tweak the message.
        (Would be neater to simply capture this within the state).  */
-    label_text desc = get_desc ();
+    label_text desc = get_desc (false);
     desc.maybe_free ();
   }
 
@@ -244,7 +244,7 @@ public:
     free (m_desc);
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::borrow (m_desc);
   }
@@ -267,7 +267,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     pretty_printer pp;
     pp_string (&pp, "stmt: ");
@@ -292,7 +292,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::take (print ("entry to %qE", m_fndecl));
   }
@@ -324,7 +324,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     if (m_origin)
       return label_text::take
@@ -403,7 +403,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     switch (m_edge->m_kind)
       {
@@ -486,7 +486,7 @@ public:
   }
   ~warning_event () { free (m_msg); }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::borrow (m_msg);
   }
@@ -1001,7 +1001,7 @@ checker3_path::to_str () const
     {
       if (i > 0)
 	result += ", ";
-      label_text event_desc (e->get_desc ());
+      label_text event_desc (e->get_desc (false));
       result += std::string ("\"") + event_desc.m_buffer + std::string ("\"");
       event_desc.maybe_free ();
     }
diff --git a/gcc/analyzer/impl-4.cc b/gcc/analyzer/impl-4.cc
index 5ff3c04..a0e3ec9 100644
--- a/gcc/analyzer/impl-4.cc
+++ b/gcc/analyzer/impl-4.cc
@@ -121,12 +121,15 @@ static int readability_comparator (const void *p1, const void *p2);
 
 /* FIXME.  */
 
-char *print (const char *fmt, ...)
+char *print (bool can_colorize, const char *fmt, ...)
 {
   /* FIXME: all this cloning is likely to be expensive.  */
   pretty_printer *pp = global_dc->printer->clone ();
   pp_clear_output_area (pp);
 
+  if (!can_colorize)
+    pp_show_color (pp) = false;
+
   text_info ti;
   rich_location rich_loc (line_table, UNKNOWN_LOCATION);
 
@@ -1220,7 +1223,7 @@ public:
   std::string to_str () const
   {
     std::string result ("\"");
-    label_text event_desc (get_desc ());
+    label_text event_desc (get_desc (false));
     result += event_desc.m_buffer;
     event_desc.maybe_free ();
     result += "\" (depth ";
@@ -1242,7 +1245,7 @@ public:
        pending_diagnostic::describe_critical_state_change;
        free_of_non_heap can use this to tweak the message.
        (Would be neater to simply capture this within the state).  */
-    label_text desc = get_desc ();
+    label_text desc = get_desc (false);
     desc.maybe_free ();
   }
 
@@ -1272,7 +1275,7 @@ public:
     free (m_desc);
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     return label_text::borrow (m_desc);
   }
@@ -1297,7 +1300,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool) const FINAL OVERRIDE
   {
     pretty_printer pp;
     pp_string (&pp, "stmt: ");
@@ -1323,9 +1326,9 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool can_colorize) const FINAL OVERRIDE
   {
-    return label_text::take (print ("entry to %qE", m_fndecl));
+    return label_text::take (print (can_colorize, "entry to %qE", m_fndecl));
   }
 
   checker4_event *clone () const FINAL OVERRIDE
@@ -1357,11 +1360,12 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool can_colorize) const FINAL OVERRIDE
   {
     if (m_origin)
       return label_text::take
-	(print ("state of %qE: %qs -> %qs (origin: %qE)",
+	(print (can_colorize,
+		"state of %qE: %qs -> %qs (origin: %qE)",
 		m_var,
 		m_sm.get_state_name (m_from),
 		m_sm.get_state_name (m_to),
@@ -1388,7 +1392,8 @@ public:
 		  {
 		    /* Append debug version.  */
 		    label_text result = label_text::take
-		      (print ("%s (state of %qE: %qs -> %qs, origin: NULL)",
+		      (print (can_colorize,
+			      "%s (state of %qE: %qs -> %qs, origin: NULL)",
 			      custom_desc.m_buffer,
 			      m_var,
 			      m_sm.get_state_name (m_from),
@@ -1403,7 +1408,8 @@ public:
 
 	/* Fallback description.  */
 	return label_text::take
-	  (print ("state of %qE: %qs -> %qs (origin: NULL)",
+	  (print (can_colorize,
+		  "state of %qE: %qs -> %qs (origin: NULL)",
 		  m_var,
 		  m_sm.get_state_name (m_from),
 		  m_sm.get_state_name (m_to)));
@@ -1454,7 +1460,7 @@ public:
     m_critical_state = state;
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool can_colorize) const FINAL OVERRIDE
   {
     switch (m_sedge->m_kind)
       {
@@ -1469,7 +1475,8 @@ public:
 	      if (edge_desc && strlen (edge_desc) > 0)
 		{
 		  label_text result
-		    = label_text::take (print ("following %qs branch",
+		    = label_text::take (print (can_colorize,
+					       "following %qs branch",
 					       edge_desc));
 		  free (edge_desc);
 		  return result;
@@ -1485,7 +1492,8 @@ public:
 	      if (strlen (edge_desc) > 0)
 		{
 		  label_text result
-		    = label_text::take (print ("taking %qs edge SN:%i -> SN:%i",
+		    = label_text::take (print (can_colorize,
+					       "taking %qs edge SN:%i -> SN:%i",
 					       edge_desc,
 					       m_sedge->m_src->m_index,
 					       m_sedge->m_dest->m_index));
@@ -1495,7 +1503,8 @@ public:
 	      else
 		{
 		  free (edge_desc);
-		  return label_text::take (print ("taking edge SN:%i -> SN:%i",
+		  return label_text::take (print (can_colorize,
+						  "taking edge SN:%i -> SN:%i",
 						  m_sedge->m_src->m_index,
 						  m_sedge->m_dest->m_index));
 		}
@@ -1516,7 +1525,8 @@ public:
 		return custom_desc;
 	    }
 
-	  return label_text::take (print ("calling %qE from %qE",
+	  return label_text::take (print (can_colorize,
+					  "calling %qE from %qE",
 					  m_sedge->m_dest->m_fun->decl,
 					  m_sedge->m_src->m_fun->decl));
 	}
@@ -1537,14 +1547,16 @@ public:
 	      if (custom_desc.m_buffer)
 		return custom_desc;
 	    }
-	  return label_text::take (print ("returning to %qE from %qE",
+	  return label_text::take (print (can_colorize,
+					  "returning to %qE from %qE",
 					  m_sedge->m_dest->m_fun->decl,
 					  m_sedge->m_src->m_fun->decl));
 	}
 
       case SUPEREDGE_INTRAPROCEDURAL_CALL:
 	return label_text::take (// TODO: possibly a higher-level description?
-				 print ("taking edge SN:%i -> SN:%i",
+				 print (can_colorize,
+					"taking edge SN:%i -> SN:%i",
 					m_sedge->m_src->m_index,
 					m_sedge->m_dest->m_index));
       }
@@ -1589,7 +1601,7 @@ public:
 	    {
 	      /* Filter events with empty descriptions.  This ought to filter
 		 FALLTHRU, but retain true/false/switch edges.  */
-	      label_text desc = get_desc ();
+	      label_text desc = get_desc (false);
 	      gcc_assert (desc.m_buffer);
 	      if (desc.m_buffer[0] == '\0')
 		return true;
@@ -1623,7 +1635,7 @@ public:
   {
   }
 
-  label_text get_desc () const FINAL OVERRIDE
+  label_text get_desc (bool can_colorize) const FINAL OVERRIDE
   {
     if (m_pending_diagnostic)
       {
@@ -1634,7 +1646,8 @@ public:
 	    if (m_sm && flag_analyzer_verbose_state_changes)
 	      {
 		label_text result = label_text::take
-		  (print ("%s (%qE is in state %qs)",
+		  (print (can_colorize,
+			  "%s (%qE is in state %qs)",
 			  ev_desc.m_buffer,
 			  m_var, m_sm->get_state_name (m_state)));
 		ev_desc.maybe_free ();
@@ -1647,7 +1660,8 @@ public:
 
     if (m_sm)
       return label_text::take
-	(print ("here (%qE is in state %qs)",
+	(print (can_colorize,
+		"here (%qE is in state %qs)",
 		m_var,
 		m_sm->get_state_name (m_state)));
     else
@@ -4569,7 +4583,7 @@ diagnostic_manager::prune_path (checker4_path *path,
 	    {
 	      if (get_logger ())
 		{
-		  label_text desc (path->m_events[idx]->get_desc ());
+		  label_text desc (path->m_events[idx]->get_desc (false));
 		  log ("filtering events %i-%i:"
 		       " irrelevant call/entry/return: %s",
 		       idx, idx + 2, desc.m_buffer);
@@ -5242,7 +5256,7 @@ checker4_path::to_str () const
     {
       if (i > 0)
 	result += ", ";
-      label_text event_desc (e->get_desc ());
+      label_text event_desc (e->get_desc (false));
       result += std::string ("\"") + event_desc.m_buffer + std::string ("\"");
       event_desc.maybe_free ();
     }
diff --git a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-CVE-2005-1689-krb5-recvauth.c b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-CVE-2005-1689-krb5-recvauth.c
index 541c587..d3fa2ec 100644
--- a/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-CVE-2005-1689-krb5-recvauth.c
+++ b/gcc/testsuite/gcc.dg/analyzer/NOT_FOR_UPSTREAM-CVE-2005-1689-krb5-recvauth.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-summary-format=inline-events" } */
+/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-format=inline-events" } */
 
 typedef unsigned char __u_char;
 typedef unsigned short int __u_short;
@@ -10561,7 +10561,7 @@ recvauth_common(krb5_context context,
  if (version && !problem)
      *version = inbuf;
  else
-     free((char *)(inbuf.data)); /* { dg-message "first 'free' here" } */
+     free((char *)(inbuf.data));
 
 
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c
index 7238624..c9569fb 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-0.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-summary-format=inline-events -fanalyzer-verbosity=0" } */
+/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-verbosity=0" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c
index 389378b..9138d18 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-1.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-summary-format=inline-events -fanalyzer-verbosity=1" } */
+/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-verbosity=1" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c
index 8530c2b..b6e89f1 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer-verbosity-2.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-summary-format=inline-events -fanalyzer-verbosity=2" } */
+/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-verbosity=2" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/analyzer.exp b/gcc/testsuite/gcc.dg/analyzer/analyzer.exp
index 4680d32..19afe57 100644
--- a/gcc/testsuite/gcc.dg/analyzer/analyzer.exp
+++ b/gcc/testsuite/gcc.dg/analyzer/analyzer.exp
@@ -22,7 +22,7 @@ load_lib gcc-dg.exp
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
 if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS " --analyzer -fdiagnostics-path-summary-format=none"
+    set DEFAULT_CFLAGS " --analyzer -fdiagnostics-path-format=separate-events"
 }
 
 # Initialize `dg'.
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c
index e114eed..3408a1d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-11.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-summary-format=inline-events" } */
+/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-format=inline-events" } */
 
 #include <stdlib.h>
 
@@ -12,8 +12,6 @@ may_call_free (void *victim)
     return;
 
   free (victim); /* { dg-warning "double-free of 'victim'" } */ 
-  /* { dg-message "first 'free' here" "" { target *-*-* } .-1 } */
-  /* { dg-message "second 'free' here" "" { target *-*-* } .-2 } */
 }
 
 void test (void *ptr)
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c
index c45efbc..ddb5ff7 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-13.c
@@ -1,4 +1,4 @@
-/* { dg-options "--analyzer -fdiagnostics-path-summary-format=none -fanalyzer-verbosity=1" } */
+/* { dg-additional-options "-fanalyzer-verbosity=1" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c
index 9ced8c0..75c07d5 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "--analyzer -fdiagnostics-path-summary-format=none -fanalyzer-verbosity=1" } */
+/* { dg-additional-options "-fanalyzer-verbosity=1" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c
index eff358a..282a577 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-unchecked.c
@@ -1,12 +1,12 @@
 /* Example of a multilevel wrapper around malloc, with an unchecked write.  */
 
-/* { dg-options "--analyzer -fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fanalyzer-checker=malloc -fanalyzer-verbose-state-changes" } */
+/* { dg-options "--analyzer -fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-checker=malloc -fanalyzer-verbose-state-changes" } */
 
 #include <stdlib.h>
 
 void *wrapped_malloc (size_t size)
 {
-  return malloc (size); /* { dg-message "this call could return NULL" } */
+  return malloc (size);
 }
 
 typedef struct boxed_int
@@ -19,7 +19,6 @@ make_boxed_int (int i)
 {
   boxed_int *result = (boxed_int *)wrapped_malloc (sizeof (boxed_int));
   result->i = i; /* { dg-warning "use of possibly-NULL 'result'" } */
-  /* { dg-message "\\(.*\\) 'result' could be NULL" "" { target *-*-* } .-1 } */
   return result;
 }
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c
index 325fa44..18e365d 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-9.c
@@ -1,4 +1,4 @@
-/* { dg-options "--analyzer -fdiagnostics-path-summary-format=none -fanalyzer-verbosity=1" } */
+/* { dg-options "--analyzer -fdiagnostics-path-format=none -fanalyzer-verbosity=1" } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c
index a1587ad..febce92 100644
--- a/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c
+++ b/gcc/testsuite/gcc.dg/analyzer/malloc-paths-9.c
@@ -1,5 +1,3 @@
-/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-nn-line-numbers -fdiagnostics-path-summary-format=inline-events" } */
-
 #include <stdlib.h>
 
 void test_1 (void)
diff --git a/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c b/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c
index c5e6f1d..b68e605 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pattern-test-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "--analyzer -fanalyzer-checker=pattern-test" } */
+/* { dg-additional-options "-fanalyzer-checker=pattern-test" } */
 
 extern void foo(void *);
 extern void bar(void *);
-- 
1.8.5.3

