Re: [patch] Small improvements to coverage info (4/n)

2019-07-12 Thread Richard Biener
On Thu, Jul 11, 2019 at 7:04 PM Eric Botcazou wrote: > > > After your patch does behavior change when trying to break on a line > > with a return stmt inside a debugger? > > Note that every patch in the series was tested against GDB too, so hopefully > this would have been caught... But the answe

Re: [patch] Small improvements to coverage info (4/n)

2019-07-11 Thread Eric Botcazou
> After your patch does behavior change when trying to break on a line > with a return stmt inside a debugger? Note that every patch in the series was tested against GDB too, so hopefully this would have been caught... But the answer is no, see lower_gimple_return: /* Generate a goto statemen

Re: [patch] Small improvements to coverage info (4/n)

2019-07-11 Thread Richard Biener
On Thu, Jul 11, 2019 at 12:52 PM Eric Botcazou wrote: > > > Hmm. So for > > > > int baz; > > int foo() > > { > > int i; > > goto skip; > > done: > > return i; > > skip: > > i = 1; > > if (baz) > > return baz; > > /* ... */ > > goto done; > > } /* (*) */ > > > > we'd assign (*) t

Re: [patch] Small improvements to coverage info (4/n)

2019-07-11 Thread Eric Botcazou
> Hmm. So for > > int baz; > int foo() > { > int i; > goto skip; > done: > return i; > skip: > i = 1; > if (baz) > return baz; > /* ... */ > goto done; > } /* (*) */ > > we'd assign (*) to the return? It might be better to record > (in struct function?) the location of any act

Re: [patch] Small improvements to coverage info (4/n)

2019-07-11 Thread Richard Biener
On Wed, Jul 10, 2019 at 11:16 PM Eric Botcazou wrote: > > Hi, > > the returns are a little problematic for coverage info because they are > commonalized in GIMPLE, i.e. turned into gotos to a representative return. > This means that you need to clear the location of the representative return, > se

[patch] Small improvements to coverage info (4/n)

2019-07-10 Thread Eric Botcazou
Hi, the returns are a little problematic for coverage info because they are commonalized in GIMPLE, i.e. turned into gotos to a representative return. This means that you need to clear the location of the representative return, see lower_gimple_return: /* Remove the line number from t