Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3640)

Issue 4316055: [pph] Fix ICE with -fpph-hdr= (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by Diego Novillo
Modified:
13 years ago
Reviewers:
CC:
Lawrence Crowl, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M gcc/c-family/c-opts.c View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 1
Diego Novillo
13 years, 1 month ago (2011-04-04 11:51:37 UTC) #1
We were not allocating memory for include_pph_mapping for -fpph-hdr=

2011-04-04  Diego Novillo  <dnovillo@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
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b