This is the mail archive of the
mailing list for the GCC project.
Patch fixing a typo.
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Ian Lance Taylor <iant at google dot com>
- Date: Wed, 22 Apr 2009 16:22:16 -0400
- Subject: Patch fixing a typo.
I've made a mistake when prepared a big patch in Dec (this patch without
#ifdef was successfully tested on m32c. #ifdef and #endif were added a
bit lately and the final patch was bootstrapped and tested on
x86/x86_64). Ian recently found this typo
The typo was not a serious one. It could have resulted in worse code
for most targets when -fira-algorithm=priority is used (it is not a
default for all architectures except for m32c). Although it might have
created problems for m32c (a weird architecture which uses priority
coloring by default).
Here is the fix
2009-04-22 Vladimir Makarov <firstname.lastname@example.org>
* genpreds.c (write_enum_constraint_num): Output definition of
* ira.c (setup_cover_and_important_classes): Use
CONSTRAINT_NUM_DEFINED_P instead of CONSTRAINT__LIMIT in #ifdef.
The patch was successfully bootstrapped on x86_64. I hope it will also
fix a m32c failure reported by DJ recently.
Is it ok to commit?
--- genpreds.c (revision 146528)
+++ genpreds.c (working copy)
@@ -954,6 +954,7 @@ write_enum_constraint_num (void)
struct constraint_data *c;
+ fputs ("#define CONSTRAINT_NUM_DEFINED_P 1\n", stdout);
fputs ("enum constraint_num\n"
" CONSTRAINT__UNKNOWN = 0", stdout);
--- ira.c (revision 146528)
+++ ira.c (working copy)
@@ -754,9 +754,9 @@ setup_cover_and_important_classes (void)
if (i == NO_REGS)
for (j = 0; j < CONSTRAINT__LIMIT; j++)
- if ((int) regclass_for_constraint (j) == i)
+ if ((int) regclass_for_constraint ((enum constraint_num) j) == i)
if (j < CONSTRAINT__LIMIT)