pa.c (hppa_encode_label): Account for addition of encoding character when...
authorJeffrey A Law <law@cygnus.com>
Wed, 22 Nov 2000 13:40:53 +0000 (13:40 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 22 Nov 2000 13:40:53 +0000 (06:40 -0700)
        * pa.c (hppa_encode_label): Account for addition of encoding
        character when allocating persistent space for the new label
        name.

From-SVN: r37654

gcc/ChangeLog
gcc/config/pa/pa.c

index 4100db538748fbdbd0a793b0bc274748145bbd70..1f7a7850c0c631335cd24ced3bc2a0d6801ef452 100644 (file)
@@ -1,3 +1,9 @@
+Wed Nov 22 06:40:56 2000  Jeffrey A Law  (law@cygnus.com)
+
+       * pa.c (hppa_encode_label): Account for addition of encoding
+       character when allocating persistent space for the new label
+       name.
+
 2000-11-22  Zack Weinberg  <zack@wolery.stanford.edu>
 
        * Makefile.in, config.gcc, configure.in: Expunge remaining
index 540f8a7e4c880831f293bde76854e25afab08620..c7f9209234e7f46d12f53e580c382cef67b060f3 100644 (file)
@@ -5954,6 +5954,11 @@ hppa_encode_label (sym)
   strcpy (newstr + 1, str);
   *newstr = '@';
 
+  /* Prepending '@' increases the length of the string.  That's important
+     to note since we're going to allocate persistent storage for the
+     new string.  */
+  len++;
+
   XSTR (sym,0) = ggc_alloc_string (newstr, len);
 }