This is the mail archive of the gcc-bugs@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]

Re: loop note nesting error



I believe I have fixed this bug.  I reverted most of my previous
patch.  The attached patch is the diffs from 1.107, i.e., the version
which I changed before.

Richard, your eyeballs on this patch would be appreciated, if you've
got a chance.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Thu Sep 16 14:03:32 1999  Mark Mitchell  <mark@codesourcery.com>

	* haifa-sched.c (sched_analyze): Keep the list of notes organized
	in pairs.
	(reemit_notes): Likewise.

Index: haifa-sched.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/haifa-sched.c,v
retrieving revision 1.107
diff -c -p -r1.107 haifa-sched.c
*** haifa-sched.c	1999/09/14 18:44:10	1.107
--- haifa-sched.c	1999/09/16 20:58:01
*************** sched_analyze (head, tail)
*** 3939,3946 ****
  		   || (NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP
  		       && GET_CODE (PREV_INSN (insn)) != CALL_INSN)))
  	{
  	  loop_notes = alloc_EXPR_LIST (REG_DEAD,
! 					GEN_INT (NOTE_BLOCK_NUMBER (insn)),
  					loop_notes);
  	  loop_notes = alloc_EXPR_LIST (REG_DEAD,
  					GEN_INT (NOTE_LINE_NUMBER (insn)),
--- 3939,3954 ----
  		   || (NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP
  		       && GET_CODE (PREV_INSN (insn)) != CALL_INSN)))
  	{
+ 	  rtx region;
+ 
+ 	  if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
+ 	      || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
+ 	    region = GEN_INT (NOTE_EH_HANDLER (insn));
+ 	  else
+ 	    region = GEN_INT (0);
+ 
  	  loop_notes = alloc_EXPR_LIST (REG_DEAD,
! 					region,
  					loop_notes);
  	  loop_notes = alloc_EXPR_LIST (REG_DEAD,
  					GEN_INT (NOTE_LINE_NUMBER (insn)),
*************** reemit_notes (insn, last)
*** 6532,6538 ****
  	      last = emit_note_before (note_type, last);
  	      remove_note (insn, note);
  	      note = XEXP (note, 1);
! 	      NOTE_BLOCK_NUMBER (last) = INTVAL (XEXP (note, 0));
  	    }
  	  remove_note (insn, note);
  	}
--- 6540,6548 ----
  	      last = emit_note_before (note_type, last);
  	      remove_note (insn, note);
  	      note = XEXP (note, 1);
! 	      if (note_type == NOTE_INSN_EH_REGION_BEG
! 		  || note_type == NOTE_INSN_EH_REGION_END)
! 		NOTE_EH_HANDLER (last) = INTVAL (XEXP (note, 0));
  	    }
  	  remove_note (insn, note);
  	}


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