]> gcc.gnu.org Git - gcc.git/commitdiff
time_profiler: Set proper type to time_profiler_counter_ptr.
authorMartin Liska <mliska@suse.cz>
Mon, 7 Nov 2016 08:57:44 +0000 (09:57 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Mon, 7 Nov 2016 08:57:44 +0000 (08:57 +0000)
* tree-profile.c (gimple_gen_time_profiler): Set proper type
to time_profiler_counter_ptr.

From-SVN: r241894

gcc/ChangeLog
gcc/tree-profile.c

index 7e5c970380fa53f2b24b6445bae299574d01f216..dc326b7bb502d1c151f1f70498d05841b5f48bfc 100644 (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
index 09a702f8bb0d2738cb9b5e0ea71e9e44506f5bae..d18b954a385da8549f278fe95659a96df12f9552 100644 (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);
This page took 0.080401 seconds and 5 git commands to generate.