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]

keep_with_call_p obvious bugfix commited


Hi,
keep_with_call_p does uninitialized memory access for pseudo registers
eventually making -fprofile-arcs compilation to diverge from
-fbranch-probabilities.  I've regtested the patch on i386 and commited it as
obvious.

Wed Jul 24 17:15:52 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* rtlanal.c (keep_with_call_p): Avoid overflow in fixed_regs.
Index: rtlanal.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtlanal.c,v
retrieving revision 1.136
diff -c -3 -p -r1.136 rtlanal.c
*** rtlanal.c	22 Jul 2002 14:29:28 -0000	1.136
--- rtlanal.c	24 Jul 2002 15:13:10 -0000
*************** keep_with_call_p (insn)
*** 3247,3252 ****
--- 3247,3253 ----
    if (INSN_P (insn) && (set = single_set (insn)) != NULL)
      {
        if (GET_CODE (SET_DEST (set)) == REG
+ 	  && REGNO (SET_DEST (set)) < FIRST_PSEUDO_REGISTER
  	  && fixed_regs[REGNO (SET_DEST (set))]
  	  && general_operand (SET_SRC (set), VOIDmode))
  	return true;


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