This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ggc-simple.c bug fixes for gcc-3.4
- From: Jim Wilson <wilson at specifixinc dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 25 Feb 2004 21:24:06 -0800
- Subject: ggc-simple.c bug fixes for gcc-3.4
This lets a --with-gc=simple build complete on the gcc-3.4 branch. This was
reported on the gcc list yesterday. There is no fix needed for mainline,
because ggc-simple.c has been removed there.
This was tested with a x86-linux --with-gc=simple make bootstrap. This took
about 5 hours, at which point I lost interest in running the testsuite. I
don't really care that this works, as people probably shouldn't be using this
feature anyways. I just wanted to make sure it built.
2004-02-25 James E Wilson <wilson@specifixinc.com>
* gcc-simple.c (rtl_zone, tree_zone, garbage_zone, ggc_alloc_typed,
ggc_alloc_zone): New.
(ggc_pch_count_object, gcc_pch_alloc_object, ggc_pch_write_object):
Add bool is_string parameter.
Index: ggc-simple.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ggc-simple.c,v
retrieving revision 1.48
diff -p -r1.48 ggc-simple.c
*** ggc-simple.c 1 Dec 2003 22:59:29 -0000 1.48
--- ggc-simple.c 26 Feb 2004 05:19:32 -0000
*************** extern void debug_ggc_balance (void);
*** 124,129 ****
--- 124,133 ----
#endif
static void tally_leaves (struct ggc_mem *, int, size_t *, size_t *);
+ struct alloc_zone *rtl_zone = NULL;
+ struct alloc_zone *tree_zone = NULL;
+ struct alloc_zone *garbage_zone = NULL;
+
/* Insert V into the search tree. */
static inline void
*************** tree_lookup (struct ggc_mem *v)
*** 159,164 ****
--- 163,184 ----
return 0;
}
+ /* Typed allocation function. Does nothing special in this collector. */
+
+ void *
+ ggc_alloc_typed (enum gt_types_enum type ATTRIBUTE_UNUSED, size_t size)
+ {
+ return ggc_alloc (size);
+ }
+
+ /* Zone allocation function. Does nothing special in this collector. */
+
+ void *
+ ggc_alloc_zone (size_t size, struct alloc_zone *zone ATTRIBUTE_UNUSED)
+ {
+ return ggc_alloc (size);
+ }
+
/* Alloc SIZE bytes of GC'able memory. If ZERO, clear the memory. */
void *
*************** init_ggc_pch (void)
*** 511,517 ****
void
ggc_pch_count_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
void *x ATTRIBUTE_UNUSED,
! size_t size ATTRIBUTE_UNUSED)
{
}
--- 531,538 ----
void
ggc_pch_count_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
void *x ATTRIBUTE_UNUSED,
! size_t size ATTRIBUTE_UNUSED,
! bool is_string ATTRIBUTE_UNUSED)
{
}
*************** ggc_pch_this_base (struct ggc_pch_data *
*** 531,537 ****
char *
ggc_pch_alloc_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
void *x ATTRIBUTE_UNUSED,
! size_t size ATTRIBUTE_UNUSED)
{
return NULL;
}
--- 552,559 ----
char *
ggc_pch_alloc_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
void *x ATTRIBUTE_UNUSED,
! size_t size ATTRIBUTE_UNUSED,
! bool is_string ATTRIBUTE_UNUSED)
{
return NULL;
}
*************** void
*** 546,552 ****
ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
FILE *f ATTRIBUTE_UNUSED, void *x ATTRIBUTE_UNUSED,
void *newx ATTRIBUTE_UNUSED,
! size_t size ATTRIBUTE_UNUSED)
{
}
--- 568,575 ----
ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
FILE *f ATTRIBUTE_UNUSED, void *x ATTRIBUTE_UNUSED,
void *newx ATTRIBUTE_UNUSED,
! size_t size ATTRIBUTE_UNUSED,
! bool is_string ATTRIBUTE_UNUSED)
{
}
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com