[RFA, RFC PATCH, rtl-optimization]: Assert that crtl->emit.regno_pointer_align_length is non-zero when calling gen_reg_rtx

Jakub Jelinek jakub@redhat.com
Thu Feb 20 20:06:00 GMT 2014


On Thu, Feb 20, 2014 at 08:34:46PM +0100, Uros Bizjak wrote:
> 2014-02-20  Uros Bizjak  <ubizjak@gmail.com>
> 
>     * emit-rtl.c (gen_reg_rtx): Assert that
>     crtl->emit.regno_pointer_align_length is non-zero.
> 
> The patch was bootstrapped and regression tested on
> x86_64-pc-linux-gnu {,-m32} on 4.8 and 4.9 branch.
> 
> OK for mainline and release branches?

Ok for trunk for the time being.  While it has been tested
on x86_64/i686, we have tons of other targets, we need some time
to find out if this doesn't break those other targets,
perhaps they have similar bug like i?86 had.

> --- emit-rtl.c  (revision 207965)
> +++ emit-rtl.c  (working copy)
> @@ -896,6 +896,9 @@ gen_reg_rtx (enum machine_mode mode)
>        return gen_rtx_CONCAT (mode, realpart, imagpart);
>      }
> 
> +  /* Do not call gen_reg_rtx with uninitialized crtl.  */
> +  gcc_assert (crtl->emit.regno_pointer_align_length);
> +
>    /* Make sure regno_pointer_align, and regno_reg_rtx are large
>       enough to have an element for this pseudo reg number.  */

	Jakub



More information about the Gcc-patches mailing list