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]

config/sh/sh.c (machine_dependent_reorg): Only call PUT_MODE on...


I have checked in this patch.  I passed it by the SH maintainer (Joern
Rennecke) first.

This fixes a core dump that can occur when compiling without optimization.

REG_UNUSED notes are removed by reload, and readded by the second flow pass.
Ordinarily there would be a note here, but there is no second flow pass when
not optimizing, so there isn't a note when -O0 is used.  This doesn't matter,
because if we aren't optimizing, we won't be running any optimization passes
that care about the notes.

Fri Aug  6 18:13:20 1999  Jim Wilson  <wilson@cygnus.com>

	* config/sh/sh.c (machine_dependent_reorg): Only call PUT_MODE on
	note if it is non-NULL.

Index: sh.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/sh/sh.c,v
retrieving revision 1.154
diff -p -r1.154 sh.c
*** sh.c	1999/06/22 02:23:32	1.154
--- sh.c	1999/08/07 01:14:47
*************** machine_dependent_reorg (first)
*** 3122,3128 ****
  			  rtx note
  			    = find_regno_note (last_float_move, REG_UNUSED, 0);
  
! 			  PUT_MODE (note, REG_INC);
  
  			  *last_float_addr = r0_inc_rtx;
  			}
--- 3122,3131 ----
  			  rtx note
  			    = find_regno_note (last_float_move, REG_UNUSED, 0);
  
! 			  /* If we are not optimizing, then there may not be
! 			     a note.  */
! 			  if (note)
! 			    PUT_MODE (note, REG_INC);
  
  			  *last_float_addr = r0_inc_rtx;
  			}


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