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]

Re: Bootstrap broken with --disable-checking


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..)

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;


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