This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Minor pa.c patch



The compiler wasn't bootstrapping because we were getting weird unresolved
symbol errors when linking code produced by the compiler -- basically all
external names were missing their last character.

This was caused by a latent but from the GC conversion.  When allocating 
GC memory for an encoded label name, we forgot to include the space for
the encoding characters in the allocation.  OOps.


This brings the compiler back to bootstrapville.  Onward to V3 conversion.


        * pa.c (hppa_encode_label): Account for addition of encoding
        character when allocating persistent space for the new label
        name.


Index: pa.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/pa/pa.c,v
retrieving revision 1.83
diff -c -3 -p -r1.83 pa.c
*** pa.c	2000/11/17 06:05:23	1.83
--- pa.c	2000/11/22 13:38:46
*************** hppa_encode_label (sym)
*** 5954,5959 ****
--- 5954,5964 ----
    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);
  }
  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]