Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-07 Thread Richard Biener via Gcc-patches
On Tue, 7 Mar 2023, Xionghu Luo wrote: > > > On 2023/3/7 16:53, Richard Biener wrote: > > On Tue, 7 Mar 2023, Xionghu Luo wrote: > > >> Unfortunately this change (flag_test_coverage -> !optimize ) caused hundred > >> of gfortran cases execution failure with O0. Take gfortran.dg/index.f90 > >>

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-07 Thread Xionghu Luo via Gcc-patches
On 2023/3/7 16:53, Richard Biener wrote: On Tue, 7 Mar 2023, Xionghu Luo wrote: Unfortunately this change (flag_test_coverage -> !optimize ) caused hundred of gfortran cases execution failure with O0. Take gfortran.dg/index.f90 for example: .gimple: __attribute__((fn spec (". "))) void

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-07 Thread Richard Biener via Gcc-patches
On Tue, 7 Mar 2023, Xionghu Luo wrote: > > > On 2023/3/6 16:11, Richard Biener wrote: > > On Mon, Mar 6, 2023 at 8:22 AM Xionghu Luo wrote: > >> > >> > >> > >> On 2023/3/2 18:45, Richard Biener wrote: > > > small.gcno: 648: block 2:`small.c':1, 3, 4, 6 >

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-06 Thread Xionghu Luo via Gcc-patches
On 2023/3/6 16:11, Richard Biener wrote: On Mon, Mar 6, 2023 at 8:22 AM Xionghu Luo wrote: On 2023/3/2 18:45, Richard Biener wrote: small.gcno: 648: block 2:`small.c':1, 3, 4, 6 small.gcno: 688:0145: 36:LINES small.gcno: 700:

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-06 Thread Richard Biener via Gcc-patches
On Mon, Mar 6, 2023 at 8:22 AM Xionghu Luo wrote: > > > > On 2023/3/2 18:45, Richard Biener wrote: > >> > >> > >>small.gcno: 648: block 2:`small.c':1, 3, 4, 6 > >>small.gcno: 688:0145: 36:LINES > >>small.gcno: 700: block 3:`small.c':8, 9 >

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-05 Thread Xionghu Luo via Gcc-patches
On 2023/3/2 18:45, Richard Biener wrote: small.gcno: 648: block 2:`small.c':1, 3, 4, 6 small.gcno: 688:0145: 36:LINES small.gcno: 700: block 3:`small.c':8, 9 small.gcno: 732:0145: 32:LINES small.gcno: 744:

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-02 Thread Richard Biener via Gcc-patches
On Thu, Mar 2, 2023 at 11:22 AM Xionghu Luo wrote: > > > > On 2023/3/2 16:41, Richard Biener wrote: > > On Thu, Mar 2, 2023 at 3:31 AM Xionghu Luo via Gcc-patches > > wrote: > >> > >> When spliting edge with self loop, the split edge should be placed just > >> next to > >> the edge_in->src,

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-02 Thread Xionghu Luo via Gcc-patches
On 2023/3/2 16:41, Richard Biener wrote: On Thu, Mar 2, 2023 at 3:31 AM Xionghu Luo via Gcc-patches wrote: When spliting edge with self loop, the split edge should be placed just next to the edge_in->src, otherwise it may generate different position latch bbs for two consecutive self

Re: [PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-02 Thread Richard Biener via Gcc-patches
On Thu, Mar 2, 2023 at 3:31 AM Xionghu Luo via Gcc-patches wrote: > > When spliting edge with self loop, the split edge should be placed just next > to > the edge_in->src, otherwise it may generate different position latch bbs for > two consecutive self loops. For details, please refer to: >

[PATCH 1/2] gcov: Fix "do-while" structure in case statement leads to incorrect code coverage [PR93680]

2023-03-01 Thread Xionghu Luo via Gcc-patches
When spliting edge with self loop, the split edge should be placed just next to the edge_in->src, otherwise it may generate different position latch bbs for two consecutive self loops. For details, please refer to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93680#c4 Regression tested pass on