From: Mikael Pettersson <mikpe@it.uu.se>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] make assign_hard_reg's saved_nregs conditional to unbreak ARM bootstrap (PR50146)
Date: Mon, 22 Aug 2011 08:05:00 -0000 [thread overview]
Message-ID: <20050.2377.468194.552162@pilspetsen.it.uu.se> (raw)
As described in PR50146, a recent change to ira-color.c caused trunk to
fail to bootstrap on ARM. The issue is that a new variable saved_nregs
is declared unconditionally but used #ifndef HONOR_REG_ALLOC_ORDER. Since
the ARM backend defines HONOR_REG_ALLOC_ORDER, an 'unused variable' warning
results, which becomes a hard error in stage 2.
Fixed by moving the declaration to the #ifndef HONOR_REG_ALLOC_ORDER block
of variable declarations. With this in place bootstrap succeeds on
armv5tel-linux-gnueabi.
Patch was pre-approved by Vladimir Makarov in the PR trail, but I don't
have svn write access so I'll need help to commit it.
/Mikael
gcc/
2011-08-22 Mikael Pettersson <mikpe@it.uu.se>
PR bootstrap/50146
* ira-color.c (assign_hard_reg): Move saved_nregs declaration
to #ifndef HONOR_REG_ALLOC_ORDER block.
--- 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
next reply other threads:[~2011-08-22 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 8:05 Mikael Pettersson [this message]
2011-08-22 9:55 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050.2377.468194.552162@pilspetsen.it.uu.se \
--to=mikpe@it.uu.se \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).