https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114599
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by J?rgen Kvalsvik <j...@gcc.gnu.org>: https://gcc.gnu.org/g:c6892a430a9752aea167265621c3ae7a3e11159f commit r14-9819-gc6892a430a9752aea167265621c3ae7a3e11159f Author: Jørgen Kvalsvik <j...@lambda.is> Date: Fri Apr 5 21:42:07 2024 +0200 Copy condition->expr map when inlining [PR114599] When a function is tree-inlined, copy the condition -> expression mapping from the inlined function into the caller, shifted so uids are not mixed. Tree inlining was always problematic under condition coverage - either through a nullptr dereference (triggered by the test case), or through quietly mixing caller conditions with the callee conditions. PR middle-end/114599 gcc/ChangeLog: * tree-inline.cc (add_local_variables): Copy cond_uids mappings. gcc/testsuite/ChangeLog: * gcc.misc-tests/gcov-pr114599.c: New test.