From: Martin Liska Date: Tue, 29 Nov 2016 13:20:00 +0000 (+0100) Subject: Make one extra BB to prevent PHI argument clash (PR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=248cce34f1003712c39639980d4cb549ef24834a;p=gcc.git Make one extra BB to prevent PHI argument clash (PR 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e8b117986ab..feb30a8d1bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-11-29 Martin Liska + + 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 * config/arc/arc.opt (marclinux): Fix typo. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 101a6e0689a..62f362a65b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-11-29 Martin Liska + + PR gcov-profile/78582 + * gcc.dg/pr78582.c: New test. + 2016-11-29 Senthil Kumar Selvaraj * testsuite/gcc.dg/pr31096-1.c: Use __{U,}INT32_TYPE__ for diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index a4f9d11b161..77fb86e51e8 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -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;