On 06/04/2024 07:50, Richard Biener wrote:


Am 05.04.2024 um 21:59 schrieb Jørgen Kvalsvik <j...@lambda.is>:

Hi,

I propose these fixes for the current issues with the condition
coverage.

Rainer, I propose to simply delete the test with __sigsetjmp. I don't
think it actually detects anything reasonable any more, I kept it around
to prevent a regression. Since then I have built a lot of programs (with
optimization enabled) and not really seen this problem.

H.J., the problem you found with -O2 was really a problem of
tree-inlining, which was actually caught earlier by Jan [1]. It probably
warrants some more testing, but I could reproduce by tuning your test
case to use always_inline and not -O2 and trigger the error.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648785.html

Ok

Thanks, committed.

I am wondering if the fn->cond_uids access should always be guarded (in tree-profile.cc) should always be guarded. Right now there is the assumption that if condition coverage is requested the will exist and be populated, but as this shows there may be other circumstances where this is not true.

Or perhaps there should be a gcc_assert to (reliably) detect cases where the map is not constructed properly?

Thanks,
Jørgen


Thanks,
Richard


Thanks,
Jørgen

Jørgen Kvalsvik (2):
  Remove unecessary and broken MC/DC compile test
  Copy condition->expr map when inlining [PR114599]

gcc/testsuite/gcc.misc-tests/gcov-19.c       | 11 ---------
gcc/testsuite/gcc.misc-tests/gcov-pr114599.c | 25 ++++++++++++++++++++
gcc/tree-inline.cc                           | 20 +++++++++++++++-
3 files changed, 44 insertions(+), 12 deletions(-)
create mode 100644 gcc/testsuite/gcc.misc-tests/gcov-pr114599.c

--
2.30.2


Reply via email to