From 5bcb571cb2f5ee77f563d872d056a4565b8d2fc4 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 7 Nov 2016 09:57:44 +0100 Subject: [PATCH] time_profiler: Set proper type to time_profiler_counter_ptr. * tree-profile.c (gimple_gen_time_profiler): Set proper type to time_profiler_counter_ptr. From-SVN: r241894 --- gcc/ChangeLog | 5 +++++ gcc/tree-profile.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e5c970380f..dc326b7bb50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-11-07 Martin Liska + + * tree-profile.c (gimple_gen_time_profiler): Set proper type + to time_profiler_counter_ptr. + 2016-11-07 Richard Biener PR tree-optimization/37150 diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 09a702f8bb0..d18b954a385 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -489,8 +489,9 @@ gimple_gen_time_profiler (unsigned tag, unsigned base) /* Emit: counters[0] = ++__gcov_time_profiler_counter. */ if (flag_profile_update == PROFILE_UPDATE_ATOMIC) { - tree ptr = make_temp_ssa_name (type, NULL, "time_profiler_counter_ptr"); - tree addr = build1 (ADDR_EXPR, build_pointer_type (type), + tree ptr = make_temp_ssa_name (build_pointer_type (type), NULL, + "time_profiler_counter_ptr"); + tree addr = build1 (ADDR_EXPR, TREE_TYPE (ptr), tree_time_profiler_counter); gassign *assign = gimple_build_assign (ptr, NOP_EXPR, addr); gsi_insert_before (&gsi, assign, GSI_NEW_STMT); -- 2.30.2