Make one extra BB to prevent PHI argument clash (PR
authorMartin Liska <mliska@suse.cz>
Tue, 29 Nov 2016 13:20:00 +0000 (14:20 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 29 Nov 2016 13:20:00 +0000 (13:20 +0000)
PR gcov-profile/78582
* gcc.dg/pr78582.c: New test.
PR gcov-profile/78582
* tree-profile.c (gimple_gen_time_profiler): Make one extra BB
to prevent PHI argument clash.

From-SVN: r242958

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/tree-profile.c

index e8b117986ab46ffaa591a11175d59d98536209c8..feb30a8d1bd37f6de552eccbdfe2ec83f26a9b06 100644 (file)
@@ -1,3 +1,9 @@
+2016-11-29  Martin Liska  <mliska@suse.cz>
+
+       PR gcov-profile/78582
+       * tree-profile.c (gimple_gen_time_profiler): Make one extra BB
+       to prevent PHI argument clash.
+
 2016-11-29  Claudiu Zissulescu  <claziss@synopsys.com>
 
        * config/arc/arc.opt (marclinux): Fix typo.
index 101a6e0689a9962861d3bc03672b179f0c731b3a..62f362a65b4c906a8558d76fa46b4d803405d118 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-29  Martin Liska  <mliska@suse.cz>
+
+       PR gcov-profile/78582
+       * gcc.dg/pr78582.c: New test.
+
 2016-11-29  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
 
        * testsuite/gcc.dg/pr31096-1.c: Use __{U,}INT32_TYPE__ for
index a4f9d11b16100731b73225d82b0bdfca0b512c63..77fb86e51e85154f3f04e96aa18f9bc3de6f52fe 100644 (file)
@@ -461,10 +461,10 @@ void
 gimple_gen_time_profiler (unsigned tag, unsigned base)
 {
   tree type = get_gcov_type ();
-  basic_block cond_bb
-    = split_edge (single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
-
+  basic_block entry = ENTRY_BLOCK_PTR_FOR_FN (cfun);
+  basic_block cond_bb = split_edge (single_succ_edge (entry));
   basic_block update_bb = split_edge (single_succ_edge (cond_bb));
+  split_edge (single_succ_edge (update_bb));
 
   edge true_edge = single_succ_edge (cond_bb);
   true_edge->flags = EDGE_TRUE_VALUE;