summaryrefslogtreecommitdiff
path: root/gcc/tree-profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r--gcc/tree-profile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index cd9b49d4304..98f7d678792 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -241,7 +241,8 @@ prepare_instrumented_value (gimple_stmt_iterator *gsi, histogram_value value)
{
tree val = value->hvalue.value;
if (POINTER_TYPE_P (TREE_TYPE (val)))
- val = fold_convert (sizetype, val);
+ val = fold_convert (build_nonstandard_integer_type
+ (TYPE_PRECISION (TREE_TYPE (val)), 1), val);
return force_gimple_operand_gsi (gsi, fold_convert (gcov_type_node, val),
true, NULL_TREE, true, GSI_SAME_STMT);
}