[0/2] More condition coverage fixes

Message ID 20240408141815.127984-1-j@lambda.is
Series More condition coverage fixes |


Jørgen Kvalsvik April 8, 2024, 2:18 p.m. UTC
  Here are two more patches for the condition coverage.

Inlined conditions are actually counted this time, as the recorded
expression mapping uses the new, deep-copied gconds as keys and not the
pointers from the source function.

The reported UB is gone when the number of conditions are exactly 64
(sizeof uint64_t), by slightly restructuring the loop generating

This passes check-gcc RUNTESTFLAGS=gcov.exp in my ubsan instrumented

configure --enable-languages=c,c++ --enable-host-shared
--enable-checking=release --disable-multilib

Jørgen Kvalsvik (2):
  Add tree-inlined gconds to caller cond->expr map
  Generate constant at start of loop, without UB

 gcc/testsuite/gcc.misc-tests/gcov-19.c | 37 ++++++++++++++++++++++
 gcc/tree-inline.cc                     | 43 ++++++++++++++------------
 gcc/tree-profile.cc                    | 20 +++++++++---
 3 files changed, 76 insertions(+), 24 deletions(-)