diff mbox

Bootstrap broken with --disable-checking

Message ID CABu31nNgwXbXSPhKcODa+LgDw2BqXDT7RzdVO4H46RA9=DcQ6g@mail.gmail.com
State New
Headers show

Commit Message

Steven Bosscher Oct. 25, 2012, 8:35 p.m. UTC
On Thu, Oct 25, 2012 at 10:24 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> This seems to fix it, is it correct?  (Untested as I'm still waiting
> for a bootstrap to finish)

I'd do it the other way around:



lra_assert is the same as gcc_checking_assert already so the whole
thing disappears with release checking.

(lra_assert and ira_assert should just be replaced with
gcc_checking_assert, really..)

Ciao!
Steven





> diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
> index 4b35726..827fd4d 100644
> --- a/gcc/lra-constraints.c
> +++ b/gcc/lra-constraints.c
> @@ -1216,11 +1216,13 @@ check_and_process_move (bool *change_p, bool *sec_mem_p)
>         = (enum reg_class) targetm.secondary_reload (true, sreg,
>                                                      (reg_class_t) dclass,
>                                                      sreg_mode, &sri);
> +#if ENABLE_ASSERT_CHECKING
>        /* Check the target hook consistency.  */
>        lra_assert
>         ((secondary_class == NO_REGS && sri.icode == CODE_FOR_nothing)
>          || (old_sclass == NO_REGS && old_sri.icode == CODE_FOR_nothing)
>          || (secondary_class == old_sclass && sri.icode == old_sri.icode));
> +#endif
>      }
>    if (sregno >= 0)
>      reg_renumber [sregno] = -1;

Comments

Vladimir Makarov Oct. 26, 2012, 3:41 a.m. UTC | #1
On 12-10-25 4:35 PM, Steven Bosscher wrote:
> On Thu, Oct 25, 2012 at 10:24 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> This seems to fix it, is it correct?  (Untested as I'm still waiting
>> for a bootstrap to finish)
> I'd do it the other way around:
>
> --- lra-constraints.c   2012-10-24 13:39:19.830019609 -0700
> +++ lra-constraints.c 2012-10-25 13:32:39.990019608 -0700
> @@ -1204,10 +1204,8 @@
>         || ((secondary_class != NO_REGS || sri.icode != CODE_FOR_nothing)
>            && dclass != NO_REGS))
>       {
> -#if ENABLE_ASSERT_CHECKING
>         enum reg_class old_sclass = secondary_class;
>         secondary_reload_info old_sri = sri;
> -#endif
>
>         sri.prev_sri = NULL;
>         sri.icode = CODE_FOR_nothing;
>
>
> lra_assert is the same as gcc_checking_assert already so the whole
> thing disappears with release checking.
>
> (lra_assert and ira_assert should just be replaced with
> gcc_checking_assert, really..)
>
>
Thanks, Steven.  I committed your recommended patch for LRA.
diff mbox

Patch

--- lra-constraints.c   2012-10-24 13:39:19.830019609 -0700
+++ lra-constraints.c 2012-10-25 13:32:39.990019608 -0700
@@ -1204,10 +1204,8 @@ 
       || ((secondary_class != NO_REGS || sri.icode != CODE_FOR_nothing)
          && dclass != NO_REGS))
     {
-#if ENABLE_ASSERT_CHECKING
       enum reg_class old_sclass = secondary_class;
       secondary_reload_info old_sri = sri;
-#endif

       sri.prev_sri = NULL;
       sri.icode = CODE_FOR_nothing;