We were not allocating memory for include_pph_mapping for -fpph-hdr=

2011-04-04  Diego Novillo  <dnovi...@google.com>

        * c-opts.c (add_pph_header_map): Create include_pph_mapping if it
        was NULL.

diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index c774dca..551db04 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -148,6 +148,9 @@ add_pph_header_map (const char *basename)
   char hdrbuf[MAXPATHLEN];
   char pphbuf[MAXPATHLEN];
 
+  if (include_pph_mapping == NULL)
+    include_pph_mapping = strstrmap_create ();
+
   length = strlen (basename);
   strcpy (hdrbuf, basename);
   strcpy (hdrbuf + length, ".h");

--
This patch is available for review at http://codereview.appspot.com/4316055

Reply via email to