aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Berlin <dan@cgsoftware.com>2001-10-05 05:26:59 +0000
committerDaniel Berlin <dan@cgsoftware.com>2001-10-05 05:26:59 +0000
commit5c6c6110d2ab0444ce086c13e703e0fab3a0f7a5 (patch)
treec0d1ad7053ebdac126ebd0c54d5ef4de9ff992e6
parent44ee3605c4ed5428b1c31d11fafe6298e076cc64 (diff)
Fix two bugs, add one temporary workaround.
Simple C precompiled headers now work (no dependency checking, no debug info (since we don't save the asm output)) git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tree-serialize-branch@46028 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/c-lang.c8
-rw-r--r--gcc/fold-const.c2
-rw-r--r--gcc/tree.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/gcc/c-lang.c b/gcc/c-lang.c
index 1c1ec583047..9049bba3ada 100644
--- a/gcc/c-lang.c
+++ b/gcc/c-lang.c
@@ -229,6 +229,11 @@ finish_file ()
strcpy (ch, input_filename);
ch = strcat (ch, ".pch");
datafilename = strdup(ch);
+ if (datafile)
+ {
+ dbm_close (datafile);
+ datafile = NULL;
+ }
lang_write_pch ();
free (ch);
if (written_pointers)
@@ -279,7 +284,10 @@ finish_file ()
}
}
if (datafile)
+ {
+ datafile = NULL;
dbm_close (datafile);
+ }
}
/* Called during diagnostic message formatting process to print a
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 90d9f16b69e..bf86cc7cdcc 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1933,7 +1933,7 @@ size_binop (code, arg0, arg1)
tree type = TREE_TYPE (arg0);
if (TREE_CODE (type) != INTEGER_TYPE || ! TYPE_IS_SIZETYPE (type)
- || type != TREE_TYPE (arg1))
+ || TYPE_UID (type) != TYPE_UID (TREE_TYPE (arg1)))
abort ();
/* Handle the special case of two integer constants faster. */
diff --git a/gcc/tree.c b/gcc/tree.c
index 3c2cdb40596..852278ff61d 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5175,7 +5175,7 @@ read_tree (id)
if (id == 0)
return NULL_TREE;
if (read_trees == NULL)
- read_trees = splay_tree_new (splay_tree_compare_pointers, NULL, NULL);
+ read_trees = splay_tree_new (splay_tree_compare_ints, NULL, NULL);
result = splay_tree_lookup (read_trees, (splay_tree_key) id);
if (result)
return (tree) result->value;