public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: <gcc@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>
Subject: [fix] for: ra-colorize.c:1068: `inv_reg_alloc_order' undeclared
Date: Wed, 24 Jul 2002 20:27:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0207242211180.22087-100000@wotan.suse.de> (raw)
In-Reply-To: <200207241916.g6OJGF5F016657@hiauly1.hia.nrc.ca>

Hi,

On Wed, 24 Jul 2002, John David Anglin wrote:

> The error occurs because inv_reg_alloc_order is only defined when
> REG_ALLOC_ORDER is defined.  None of the vax ports define this macro.

Fixed thusly (will checkin after bootstrap/regtest):


Ciao,
Michael.
-- 
        * ra-colorize.c (inv_reg_alloc_order): New macro.
        (free_reg): Use it.

Index: ra-colorize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-colorize.c,v
retrieving revision 1.2
diff -u -p -r1.2 ra-colorize.c
--- ra-colorize.c	15 Jul 2002 14:07:05 -0000	1.2
+++ ra-colorize.c	24 Jul 2002 20:09:14 -0000
@@ -1031,6 +1031,13 @@ color_usable_p (c, dont_begin_colors, fr
   return 0;
 }

+/* I don't want to clutter up the actual code with ifdef's.  */
+#ifdef REG_ALLOC_ORDER
+#define inv_reg_alloc_order(c) inv_reg_alloc_order[c]
+#else
+#define inv_reg_alloc_order(c) c
+#endif
+
 /* Searches in FREE_COLORS for a block of hardregs of the right length
    for MODE, which doesn't begin at a hardreg mentioned in DONT_BEGIN_COLORS.
    If it needs more than one hardreg it prefers blocks beginning
@@ -1065,16 +1072,16 @@ get_free_reg (dont_begin_colors, free_co
 	  {
 	    if (size < 2 || (c & 1) == 0)
 	      {
-		if (inv_reg_alloc_order[c] < pref_reg_order)
+		if (inv_reg_alloc_order (c) < pref_reg_order)
 		  {
 		    pref_reg = c;
-		    pref_reg_order = inv_reg_alloc_order[c];
+		    pref_reg_order = inv_reg_alloc_order (c);
 		  }
 	      }
-	    else if (inv_reg_alloc_order[c] < last_resort_reg_order)
+	    else if (inv_reg_alloc_order (c) < last_resort_reg_order)
 	      {
 		last_resort_reg = c;
-		last_resort_reg_order = inv_reg_alloc_order[c];
+		last_resort_reg_order = inv_reg_alloc_order (c);
 	      }
 	  }
 	else

  reply	other threads:[~2002-07-24 20:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 16:05 John David Anglin
2002-07-24 20:27 ` Michael Matz [this message]
2002-07-24 21:48   ` [fix] for: " John David Anglin
2002-07-24 22:44     ` Michael Matz

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=Pine.LNX.4.33.0207242211180.22087-100000@wotan.suse.de \
    --to=matz@suse.de \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@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).