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
This commit is contained in:
Martin Liska 2016-11-07 09:57:44 +01:00 committed by Martin Liska
parent 29afecdf1b
commit 5bcb571cb2
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2016-11-07 Martin Liska <mliska@suse.cz>
* tree-profile.c (gimple_gen_time_profiler): Set proper type
to time_profiler_counter_ptr.
2016-11-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/37150

View File

@ -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);