This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[Patch]fix new reg-alloc-branch crash in final.c
- From: Ramana Radhakrishnan <ramana dot r at gmail dot com>
- To: Michael Matz <matz at suse dot de>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 10 Sep 2004 10:57:31 +0530
- Subject: [Patch]fix new reg-alloc-branch crash in final.c
- References: <67ea2eb040905020128b03316@mail.gmail.com> <Pine.LNX.4.58.0409060926360.20630@wotan.suse.de> <67ea2eb040906011154bb737b@mail.gmail.com> <Pine.LNX.4.58.0409061752050.20630@wotan.suse.de> <67ea2eb04090912034440bc2a@mail.gmail.com> <Pine.LNX.4.58.0409092105250.1173@wotan.suse.de>
- Reply-to: Ramana Radhakrishnan <ramana dot r at gmail dot com>
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
}