public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap
@ 2011-08-21 17:43 mikpe at it dot uu.se
  2011-08-21 19:37 ` [Bug bootstrap/50146] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mikpe at it dot uu.se @ 2011-08-21 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50146
           Summary: [4.7 regression] unused variable saved_nregs in
                    ira-color.c broke arm-linux-gnueabi bootstrap
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mikpe@it.uu.se


gcc-4.7-20110820 fails to bootstrap on arm-linux-gnueabi with:

/mnt/scratch/objdir47/./prev-gcc/xgcc -B/mnt/scratch/objdir47/./prev-gcc/
-B/mnt/scratch/install47/armv5tel-brewer-linux-gnueabi/bin/
-B/mnt/scratch/install47/armv5tel-brewer-linux-gnueabi/bin/
-B/mnt/scratch/install47/armv5tel-brewer-linux-gnueabi/lib/ -isystem
/mnt/scratch/install47/armv5tel-brewer-linux-gnueabi/include -isystem
/mnt/scratch/install47/armv5tel-brewer-linux-gnueabi/sys-include    -c   -g -O2
-gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition
-Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I/mnt/scratch/gcc-4.7-20110820/gcc
-I/mnt/scratch/gcc-4.7-20110820/gcc/.
-I/mnt/scratch/gcc-4.7-20110820/gcc/../include
-I/mnt/scratch/gcc-4.7-20110820/gcc/../libcpp/include
-I/home/mikpe/pkgs/linux-armv5l/gmp-4.3.2/include
-I/home/mikpe/pkgs/linux-armv5l/mpfr-2.4.2/include
-I/home/mikpe/pkgs/linux-armv5l/mpc-0.8.2/include 
-I/mnt/scratch/gcc-4.7-20110820/gcc/../libdecnumber
-I/mnt/scratch/gcc-4.7-20110820/gcc/../libdecnumber/dpd -I../libdecnumber   
/mnt/scratch/gcc-4.7-20110820/gcc/ira-color.c -o ira-color.o
/mnt/scratch/gcc-4.7-20110820/gcc/ira-color.c: In function 'assign_hard_reg':
/mnt/scratch/gcc-4.7-20110820/gcc/ira-color.c:1570:54: error: unused variable
'saved_nregs' [-Werror=unused-variable]
cc1: all warnings being treated as errors

make[3]: *** [ira-color.o] Error 1
make[3]: Leaving directory `/mnt/scratch/objdir47/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/mnt/scratch/objdir47'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/mnt/scratch/objdir47'
make: *** [bootstrap] Error 2

The previous weekly snapshot, gcc-4.7-20110813, bootstrapped fine.

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/50146] [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap
  2011-08-21 17:43 [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap mikpe at it dot uu.se
@ 2011-08-21 19:37 ` rguenth at gcc dot gnu.org
  2011-08-22  3:38 ` vmakarov at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-21 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/50146] [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap
  2011-08-21 17:43 [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap mikpe at it dot uu.se
  2011-08-21 19:37 ` [Bug bootstrap/50146] " rguenth at gcc dot gnu.org
@ 2011-08-22  3:38 ` vmakarov at redhat dot com
  2011-08-22  8:40 ` mikpe at it dot uu.se
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: vmakarov at redhat dot com @ 2011-08-22  3:38 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/50146] [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap
  2011-08-21 17:43 [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap mikpe at it dot uu.se
  2011-08-21 19:37 ` [Bug bootstrap/50146] " rguenth at gcc dot gnu.org
  2011-08-22  3:38 ` vmakarov at redhat dot com
@ 2011-08-22  8:40 ` mikpe at it dot uu.se
  2011-08-22  9:41 ` jakub at gcc dot gnu.org
  2011-08-22  9:44 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: mikpe at it dot uu.se @ 2011-08-22  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2011-08-22 08:36:21 UTC ---
Patch has been posted:
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01715.html

I don't have svn write access so I asked for help to commit it.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/50146] [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap
  2011-08-21 17:43 [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap mikpe at it dot uu.se
                   ` (2 preceding siblings ...)
  2011-08-22  8:40 ` mikpe at it dot uu.se
@ 2011-08-22  9:41 ` jakub at gcc dot gnu.org
  2011-08-22  9:44 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-22  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-22 09:38:18 UTC ---
Author: jakub
Date: Mon Aug 22 09:38:14 2011
New Revision: 177951

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177951
Log:
    PR bootstrap/50146
    * ira-color.c (assign_hard_reg): Move saved_nregs declaration
    to #ifndef HONOR_REG_ALLOC_ORDER block.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-color.c


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug bootstrap/50146] [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap
  2011-08-21 17:43 [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap mikpe at it dot uu.se
                   ` (3 preceding siblings ...)
  2011-08-22  9:41 ` jakub at gcc dot gnu.org
@ 2011-08-22  9:44 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-22  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-22 09:41:06 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-22  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-21 17:43 [Bug bootstrap/50146] New: [4.7 regression] unused variable saved_nregs in ira-color.c broke arm-linux-gnueabi bootstrap mikpe at it dot uu.se
2011-08-21 19:37 ` [Bug bootstrap/50146] " rguenth at gcc dot gnu.org
2011-08-22  3:38 ` vmakarov at redhat dot com
2011-08-22  8:40 ` mikpe at it dot uu.se
2011-08-22  9:41 ` jakub at gcc dot gnu.org
2011-08-22  9:44 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).