This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
keep_with_call_p obvious bugfix commited
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Jul 2002 17:24:35 +0200
- Subject: 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;