This is the mail archive of the gcc@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: Urgent: bug fixes needed for GCC 3.0.2


  In message <31840000.1002564522@gandalf.codesourcery.com>you write:
  > >   > OK, that does sound reasonably sane.  Do you have time to give it a
  > > try? Interestingly enough we already do this in sibcall.c.  I'm
  > > investigating why it's not catching this case.
  > 
  > Thanks for the update.
The existing code to clear RTX_UNCHANGING_P stops its search when it
encounters NOTE_INSN_FUNCTION_BEG.  Of course, the offending memory
reference was after the NOTE_INSN_FUNCTION_BEG.

It appears that the assumption that incoming args were loaded into
pseudos at the start of the function and the arg slots were afterwards
unused is incorrect.

I believe this patch will fix the problem.  It bootstraps on my x86-linux
machine and the testresults look good.

If you could give it a once-over and install it I would appreciate it
(I've got a ton of stuff to deal with before I leave town).  The testcase
from the PR also needs to be added to the testsuite.

Good luck with gcc-3.0.2!


Index: sibcall.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/sibcall.c,v
retrieving revision 1.10.4.2
diff -c -3 -p -r1.10.4.2 sibcall.c
*** sibcall.c	2001/06/04 20:25:58	1.10.4.2
--- sibcall.c	2001/10/08 19:12:34
*************** success:
*** 663,674 ****
  	 we actually write into.  */
        for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
  	{
! 	  if (GET_CODE (insn) == NOTE)
! 	    {
! 	      if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
! 		break;
! 	    }
! 	  else if (INSN_P (insn))
  	    purge_mem_unchanging_flag (PATTERN (insn));
  	}
      }
--- 663,669 ----
  	 we actually write into.  */
        for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
  	{
! 	  if (INSN_P (insn))
  	    purge_mem_unchanging_flag (PATTERN (insn));
  	}
      }



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