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


Alexandre Oliva <aoliva@redhat.com> writes:

>>From  Alexandre Oliva  <aoliva@redhat.com>
>
> 	* print_rtl (print_rtx): Don't assume modes in EXPR_LISTs and
> 	INSN_LISTs must refer to REG_NOTEs.
>
> Index: gcc/print-rtl.c
> ===================================================================
> --- gcc/print-rtl.c.orig	2009-05-28 04:33:03.000000000 -0300
> +++ gcc/print-rtl.c	2009-05-28 04:48:30.000000000 -0300
> @@ -207,7 +207,9 @@ print_rtx (const_rtx in_rtx)
>  	  if (GET_CODE (in_rtx) == EXPR_LIST
>  	      || GET_CODE (in_rtx) == INSN_LIST)
>  	    fprintf (outfile, ":%s",
> -		     GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
> +		     (int)GET_MODE (in_rtx) >= REG_NOTE_MAX
> +		     ? GET_MODE_NAME (GET_MODE (in_rtx))
> +		     : GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
>  
>  	  /* For other rtl, print the mode if it's not VOID.  */
>  	  else if (GET_MODE (in_rtx) != VOIDmode)


Write this as

  if ((GET_CODE (in_rtx) == EXPR_LIST
       || GET_CODE (in_rtx) == INSN_LIST)
      && (int) GET_MODE (in_rtx) < (int) REG_NOTE_MAX)

(rather than duplicating GET_MODE_NAME).

OK with that change.

Thanks.

Ian


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