This is the mail archive of the gcc@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]
Other format: [Raw text]

[Patch]fix new reg-alloc-branch crash in final.c


Hi Michael,

<snip> 
> No.  Except for seeing where it crashes, and fixing the bug.  Do you want
> to?

Tracked to  final.c : profile_function which I have fixed based on the
patches suggested at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12315
. The patch below fixes it for the ra-branch .

There are still a couple of other libstdc++ errors that I am looking at . 

cheers
Ramana

-- 
Ramana Radhakrishnan

ChangeLog
* 20040906: Ramana Radhakrishnan <ramana.r@gmail.com>

final.c : backport of a profiling patch from gcc3.4 head to
reg-alloc-branch to fix a crash while building the regalloc branch
with profiling. Based on patches suggested by Alan Modra and DJ
Delorie for fix to Bug #12315.

Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.155.2.8
diff -a -u -r1.155.2.8 final.c
--- final.c     10 Oct 2003 14:18:31 -0000      1.155.2.8
+++ final.c     10 Sep 2004 05:21:11 -0000
@@ -1437,7 +1437,7 @@
   function_section (current_function_decl);
  
 #if defined(ASM_OUTPUT_REG_PUSH)
-  if (sval && GET_CODE (svrtx) == REG)
+  if (sval && svrtx != NULL_RTX && GET_CODE (svrtx) == REG)
     ASM_OUTPUT_REG_PUSH (file, REGNO (svrtx));
 #endif
  
@@ -1468,7 +1468,7 @@
 #endif
  
 #if defined(ASM_OUTPUT_REG_PUSH)
-  if (sval && GET_CODE (svrtx) == REG)
+  if (sval && svrtx != NULL_RTX && GET_CODE (svrtx) == REG)
     ASM_OUTPUT_REG_POP (file, REGNO (svrtx));
 #endif
 }


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