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]
Other format: [Raw text]

Re: [vta, trunk?] oops, one more: don't crash on ppc64's expr_lists in parallels


On Jun  2, 2009, Ian Lance Taylor <iant@google.com> wrote:

>> Just to be sure...  Are you suggesting we refrain from printing the mode
>> of an EXPR_LIST and INSN_LIST when the mode is not in the REG_NOTE
>> range?

> No.  The else clause will print it.

Aah, the else clause I was too blind to see! :-)

Makes sense now, sorry for being so dense.

Here's what I'm checking in.


for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* print_rtl (print_rtx): Don't print modes in EXPR_LISTs and
	INSN_LISTs that are out of the REG_NOTE range.

Index: gcc/print-rtl.c
===================================================================
--- gcc/print-rtl.c.orig	2009-06-02 05:13:34.000000000 -0300
+++ gcc/print-rtl.c	2009-06-02 05:13:35.000000000 -0300
@@ -1,6 +1,6 @@
 /* Print RTL for GCC.
    Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000, 2002, 2003,
-   2004, 2005, 2007, 2008
+   2004, 2005, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -204,8 +204,9 @@ print_rtx (const_rtx in_rtx)
 	    fputs ("/i", outfile);
 
 	  /* Print REG_NOTE names for EXPR_LIST and INSN_LIST.  */
-	  if (GET_CODE (in_rtx) == EXPR_LIST
-	      || GET_CODE (in_rtx) == INSN_LIST)
+	  if ((GET_CODE (in_rtx) == EXPR_LIST
+	       || GET_CODE (in_rtx) == INSN_LIST)
+	      && (int)GET_MODE (in_rtx) < REG_NOTE_MAX)
 	    fprintf (outfile, ":%s",
 		     GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
 
-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

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