diff options
author | Richard Henderson <rth@redhat.com> | 2012-07-25 08:10:44 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2012-07-25 08:10:44 -0700 |
commit | 5714c34f155fc589f7da1d625990ac4a92679dc9 (patch) | |
tree | bdb3cf569a522f1b7ba2c5d4e351cd5e2e756fe1 /gcc | |
parent | 452ed9e73bfdc6b08003cd0f79c8df8bd7af5b1d (diff) | |
download | gcc-5714c34f155fc589f7da1d625990ac4a92679dc9.zip gcc-5714c34f155fc589f7da1d625990ac4a92679dc9.tar.gz gcc-5714c34f155fc589f7da1d625990ac4a92679dc9.tar.bz2 |
re PR bootstrap/54092 (Bootstrap fails while building Ada at stage 1)
PR bootstrap/54092
* libfuncs.h: Don't include optabs.h.
(struct libfunc_entry): Use "int" for op, mode1, mode2 members.
* optabs.c (hash_libfunc): Don't cast members to int.
* Makefile.in (LIBFUNCS_H): Don't include OPTABS_H.
From-SVN: r189853
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/libfuncs.h | 17 | ||||
-rw-r--r-- | gcc/optabs.c | 2 |
4 files changed, 20 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 051d5e0..928eb09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-07-25 Richard Henderson <rth@redhat.com> + + PR bootstrap/54092 + * libfuncs.h: Don't include optabs.h. + (struct libfunc_entry): Use "int" for op, mode1, mode2 members. + * optabs.c (hash_libfunc): Don't cast members to int. + * Makefile.in (LIBFUNCS_H): Don't include OPTABS_H. + 2012-07-25 Dodji Seketeli <dodji@redhat.com> * basic-block.c: Fix typo in comment. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 40f7c4d..d7b8a76 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -971,7 +971,7 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h plugin.def \ $(CONFIG_H) $(SYSTEM_H) $(HASHTAB_H) PLUGIN_H = plugin.h $(GCC_PLUGIN_H) PLUGIN_VERSION_H = plugin-version.h configargs.h -LIBFUNCS_H = libfuncs.h $(HASHTAB_H) $(OPTABS_H) +LIBFUNCS_H = libfuncs.h $(HASHTAB_H) # # Now figure out from those variables how to compile and link. diff --git a/gcc/libfuncs.h b/gcc/libfuncs.h index 75f7a69..262e10f 100644 --- a/gcc/libfuncs.h +++ b/gcc/libfuncs.h @@ -1,5 +1,5 @@ /* Definitions for code generation pass of GNU compiler. - Copyright (C) 2001, 2004, 2007, 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2001-2012 Free Software Foundation, Inc. This file is part of GCC. @@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see #define GCC_LIBFUNCS_H #include "hashtab.h" -#include "optabs.h" /* Enumeration of indexes into libfunc_table. */ enum libfunc_index @@ -48,12 +47,16 @@ enum libfunc_index LTI_MAX }; -/* Information about an optab-related libfunc. We use the same hashtable - for normal optabs and conversion optabs. In the first case mode2 - is unused. */ +/* Information about an optab-related libfunc. The op field is logically + an enum optab_d, and the mode fields are logically enum machine_mode. + However, in the absence of forward-declared enums, there's no practical + benefit of pulling in the defining headers. + + We use the same hashtable for normal optabs and conversion optabs. In + the first case mode2 is forced to VOIDmode. */ + struct GTY(()) libfunc_entry { - optab op; - enum machine_mode mode1, mode2; + int op, mode1, mode2; rtx libfunc; }; diff --git a/gcc/optabs.c b/gcc/optabs.c index 022adfa..462aa7c 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -75,7 +75,7 @@ static hashval_t hash_libfunc (const void *p) { const struct libfunc_entry *const e = (const struct libfunc_entry *) p; - return (((int) e->mode1 + (int) e->mode2 * NUM_MACHINE_MODES) ^ e->op); + return ((e->mode1 + e->mode2 * NUM_MACHINE_MODES) ^ e->op); } /* Used for libfunc_hash. */ |