aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2007-06-21 23:46:59 +0000
committerAdam Nemet <nemet@gcc.gnu.org>2007-06-21 23:46:59 +0000
commitf1b42630a5f005107be91f060db48a0dd33f0dc5 (patch)
treea63dd182b428904091d9aad4506b852d5e8a289e /gcc/fold-const.c
parent70826cbbef8e6392e3d961e0054af937bcb56a16 (diff)
downloadgcc-f1b42630a5f005107be91f060db48a0dd33f0dc5.zip
gcc-f1b42630a5f005107be91f060db48a0dd33f0dc5.tar.gz
gcc-f1b42630a5f005107be91f060db48a0dd33f0dc5.tar.bz2
fold-const.c (debug_fold_checksum): Move it under ENABLE_FOLD_CHECKING.
* fold-const.c (debug_fold_checksum): Move it under ENABLE_FOLD_CHECKING. From-SVN: r125932
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index c3b77d4..eaf637c 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -12943,6 +12943,30 @@ recursive_label:
}
}
+/* Helper function for outputting the checksum of a tree T. When
+ debugging with gdb, you can "define mynext" to be "next" followed
+ by "call debug_fold_checksum (op0)", then just trace down till the
+ outputs differ. */
+
+void
+debug_fold_checksum (tree t)
+{
+ int i;
+ unsigned char checksum[16];
+ struct md5_ctx ctx;
+ htab_t ht = htab_create (32, htab_hash_pointer, htab_eq_pointer, NULL);
+
+ md5_init_ctx (&ctx);
+ fold_checksum_tree (t, &ctx, ht);
+ md5_finish_ctx (&ctx, checksum);
+ htab_empty (ht);
+
+ for (i = 0; i < 16; i++)
+ fprintf (stderr, "%d ", checksum[i]);
+
+ fprintf (stderr, "\n");
+}
+
#endif
/* Fold a unary tree expression with code CODE of type TYPE with an
@@ -12982,30 +13006,6 @@ fold_build1_stat (enum tree_code code, tree type, tree op0 MEM_STAT_DECL)
return tem;
}
-/* Helper function for outputting the checksum of a tree T. When
- debugging with gdb, you can "define mynext" to be "next" followed
- by "call debug_fold_checksum (op0)", then just trace down till the
- outputs differ. */
-
-void
-debug_fold_checksum (tree t)
-{
- int i;
- unsigned char checksum[16];
- struct md5_ctx ctx;
- htab_t ht = htab_create (32, htab_hash_pointer, htab_eq_pointer, NULL);
-
- md5_init_ctx (&ctx);
- fold_checksum_tree (t, &ctx, ht);
- md5_finish_ctx (&ctx, checksum);
- htab_empty (ht);
-
- for (i = 0; i < 16; i++)
- fprintf (stderr, "%d ", checksum[i]);
-
- fprintf (stderr, "\n");
-}
-
/* Fold a binary tree expression with code CODE of type TYPE with
operands OP0 and OP1. Return a folded expression if successful.
Otherwise, return a tree expression with code CODE of type TYPE