This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70594] [6 Regression] -fcompare-debug failure
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 09 Apr 2016 02:12:45 +0000
- Subject: [Bug c++/70594] [6 Regression] -fcompare-debug failure
- Auto-submitted: auto-generated
- References: <bug-70594-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594
--- Comment #15 from Patrick Palka <ppalka at gcc dot gnu.org> ---
I tried building latest gcc with BOOT_CFLAGS="-O2 -fcompare-debug" and the
build fails with an -fcompare-debug error while compiling dwarf2out.c. The
failure doesn't go away if I make the constexpr_call_table non-deletable
either. However, if I "disable" the fundef_copies_table with the following
patch as well then the failure goes away. Like in Tobias' case, passing
-save-temps to the compiler makes the failure mysteriously go away too.
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index d84377b..234b09c 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -915,7 +915,7 @@ struct constexpr_ctx {
/* A table of all constexpr calls that have been evaluated by the
compiler in this translation unit. */
-static GTY ((deletable)) hash_table<constexpr_call_hasher>
*constexpr_call_table;
+static GTY (()) hash_table<constexpr_call_hasher> *constexpr_call_table;
static tree cxx_eval_constant_expression (const constexpr_ctx *, tree,
bool, bool *, bool *, tree * = NULL);
@@ -1012,7 +1012,7 @@ get_fundef_copy (tree fun)
fundef_copy *copy;
fundef_copy **slot = &fundef_copies_table.map->get_or_insert (fun, NULL);
- if (*slot == NULL)
+ if (1)
{
copy = ggc_alloc<fundef_copy> ();
copy->body = copy_fn (fun, copy->parms, copy->res);
So it looks like marking constexpr_call_table as non-deletable is not
sufficient.