This is the mail archive of the gcc-bugs@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]

[Bug bootstrap/50146] [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50146

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #1 from Vladimir Makarov <vmakarov at redhat dot com> 2011-08-22 03:32:18 UTC ---
(In reply to comment #0)
> gcc-4.7-20110820 fails to bootstrap on arm-linux-gnueabi with:
> 

> The issue is that saved_nregs is declared unconditionally but used #ifndef
> HONOR_REG_ALLOC_ORDER.  The ARM backend does define HONOR_REG_ALLOC_ORDER, so
> the warning is expected.
> 
> I'm testing the following fix:
> 
> --- gcc-4.7-20110820/gcc/ira-color.c.~1~        2011-08-18 16:56:36.000000000
> +0200
> +++ gcc-4.7-20110820/gcc/ira-color.c    2011-08-21 19:11:00.000000000 +0200
> @@ -1567,13 +1567,14 @@ static bool
>  assign_hard_reg (ira_allocno_t a, bool retry_p)
>  {
>    HARD_REG_SET conflicting_regs[2], profitable_hard_regs[2];
> -  int i, j, hard_regno, best_hard_regno, class_size, saved_nregs;
> +  int i, j, hard_regno, best_hard_regno, class_size;
>    int cost, mem_cost, min_cost, full_cost, min_full_cost, nwords, word;
>    int *a_costs;
>    enum reg_class aclass;
>    enum machine_mode mode;
>    static int costs[FIRST_PSEUDO_REGISTER], full_costs[FIRST_PSEUDO_REGISTER];
>  #ifndef HONOR_REG_ALLOC_ORDER
> +  int saved_nregs;
>    enum reg_class rclass;
>    int add_cost;
>  #endif

Sorry, my bad.  It is from my patch for PR50107.

The patch is ok so you can commit it to the trunk.

Thank you.


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