Fix bug in gcse

Josef Zlomek zlomekj@suse.cz
Fri Jan 24 10:32:00 GMT 2003


> Bootstrapped/regtested mainline i386, bootstrapped mainline x86_64.
> OK for mainline and 3_3-branch?
> 
> Josef
> 

Oops, I forgot to write a changelog.

2003-01-24  Josef Zlomek  <zlomekj@suse.cz>

	* gcse.c (constprop_register): Check NEXT_INSN (insn) != NULL.

> Index: gcse.c
> ===================================================================
> RCS file: /cvsroot/gcc/gcc/gcc/gcse.c,v
> retrieving revision 1.228
> diff -c -3 -p -r1.228 gcse.c
> *** gcse.c	23 Jan 2003 02:57:24 -0000	1.228
> --- gcse.c	23 Jan 2003 23:38:51 -0000
> *************** constprop_register (insn, from, to, alte
> *** 4126,4131 ****
> --- 4126,4132 ----
>        conditional branch instructions first.  */
>     if (alter_jumps
>         && (sset = single_set (insn)) != NULL
> +       && NEXT_INSN (insn)
>         && any_condjump_p (NEXT_INSN (insn)) && onlyjump_p (NEXT_INSN (insn)))
>       {
>         rtx dest = SET_DEST (sset);



More information about the Gcc-patches mailing list