Commit 5714c34f by Richard Henderson Committed by Richard Henderson

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
parent 452ed9e7
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> 2012-07-25 Dodji Seketeli <dodji@redhat.com>
* basic-block.c: Fix typo in comment. * basic-block.c: Fix typo in comment.
......
...@@ -971,7 +971,7 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h plugin.def \ ...@@ -971,7 +971,7 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h plugin.def \
$(CONFIG_H) $(SYSTEM_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) $(HASHTAB_H)
PLUGIN_H = plugin.h $(GCC_PLUGIN_H) PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
PLUGIN_VERSION_H = plugin-version.h configargs.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. # Now figure out from those variables how to compile and link.
......
/* Definitions for code generation pass of GNU compiler. /* 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. This file is part of GCC.
...@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#define GCC_LIBFUNCS_H #define GCC_LIBFUNCS_H
#include "hashtab.h" #include "hashtab.h"
#include "optabs.h"
/* Enumeration of indexes into libfunc_table. */ /* Enumeration of indexes into libfunc_table. */
enum libfunc_index enum libfunc_index
...@@ -48,12 +47,16 @@ enum libfunc_index ...@@ -48,12 +47,16 @@ enum libfunc_index
LTI_MAX LTI_MAX
}; };
/* Information about an optab-related libfunc. We use the same hashtable /* Information about an optab-related libfunc. The op field is logically
for normal optabs and conversion optabs. In the first case mode2 an enum optab_d, and the mode fields are logically enum machine_mode.
is unused. */ 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 { struct GTY(()) libfunc_entry {
optab op; int op, mode1, mode2;
enum machine_mode mode1, mode2;
rtx libfunc; rtx libfunc;
}; };
......
...@@ -75,7 +75,7 @@ static hashval_t ...@@ -75,7 +75,7 @@ static hashval_t
hash_libfunc (const void *p) hash_libfunc (const void *p)
{ {
const struct libfunc_entry *const e = (const struct libfunc_entry *) 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. */ /* Used for libfunc_hash. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment