Some serious problem with GC again
Daniel Jacobowitz
drow@false.org
Sun Sep 12 17:22:00 GMT 2004
On Sun, Sep 12, 2004 at 04:39:46PM +0200, Steven Bosscher wrote:
> On Sunday 12 September 2004 16:38, Steven Bosscher wrote:
> > <built-in>:0: internal compiler error: tree check: expected record_type or
> > union_type or qual_union_type, have integer_type in fold_checksum_tree, at
> > fold-const.c:9181
>
> *hits himself for head*
>
> This is of course a fold checking problem. Hmm... That
> would be yours, Nathan.
It's not the only one. I've been meaning to post this... OK?
--
Daniel Jacobowitz
2004-09-12 Daniel Jacobowitz <dan@debian.org>
* fold-const.c (fold_checksum_tree): Ignore TYPE_CACHED_VALUES.
Only use TYPE_BINFO for aggregates.
Index: fold-const.c
===================================================================
RCS file: /home/drow/rsync/gcc-cvs/gcc/gcc/fold-const.c,v
retrieving revision 1.455
diff -u -p -r1.455 fold-const.c
--- fold-const.c 11 Sep 2004 19:48:53 -0000 1.455
+++ fold-const.c 12 Sep 2004 15:05:39 -0000
@@ -9094,13 +9094,16 @@ fold_checksum_tree (tree expr, struct md
SET_DECL_ASSEMBLER_NAME (expr, NULL);
}
else if (TREE_CODE_CLASS (code) == 't'
- && (TYPE_POINTER_TO (expr) || TYPE_REFERENCE_TO (expr)))
+ && (TYPE_POINTER_TO (expr) || TYPE_REFERENCE_TO (expr)
+ || TYPE_CACHED_VALUES_P (expr)))
{
- /* Allow TYPE_POINTER_TO and TYPE_REFERENCE_TO to be modified. */
+ /* Allow these fields to be modified. */
memcpy (buf, expr, tree_size (expr));
expr = (tree) buf;
TYPE_POINTER_TO (expr) = NULL;
TYPE_REFERENCE_TO (expr) = NULL;
+ TYPE_CACHED_VALUES_P (expr) = 0;
+ TYPE_CACHED_VALUES (expr) = NULL;
}
md5_process_bytes (expr, tree_size (expr), ctx);
fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
@@ -9178,7 +9181,10 @@ fold_checksum_tree (tree expr, struct md
fold_checksum_tree (TYPE_MAX_VALUE (expr), ctx, ht);
}
fold_checksum_tree (TYPE_MAIN_VARIANT (expr), ctx, ht);
- fold_checksum_tree (TYPE_BINFO (expr), ctx, ht);
+ if (TREE_CODE (expr) == RECORD_TYPE
+ || TREE_CODE (expr) == UNION_TYPE
+ || TREE_CODE (expr) == QUAL_UNION_TYPE)
+ fold_checksum_tree (TYPE_BINFO (expr), ctx, ht);
fold_checksum_tree (TYPE_CONTEXT (expr), ctx, ht);
break;
default:
More information about the Gcc-patches
mailing list