Hi there, I'm investigating line coverage for a new feature that I'm introducing to Mbed TLS, and I'm seeing inconsistencies when it comes to line coverage (branch information seems fine):

line 1857 is hit, even though nothing executed it.
Reproduction steps:
Starting from here:
make CFLAGS='--coverage -g3 -O0' LDFLAGS='--coverage' -C tests test_suite_x509parse
(cd tests && ./test_suite_x509parse)
make lcov #runs [scripts/lcov.sh](https://github.com/Mbed-TLS/mbedtls/blob/development/scripts/lcov.sh)
firefox Coverage/index.html
Check library/x509_crt.c coverage, line 1856 & 1857. The insides of the condition should not be hit.
I reduced the number of tests run to one that highlights the problem.
If you're not able to run this test or you'd like me to produce a possibly minimal test case - let me know, I'll try harder :)
Tool versions:
lcov 1.14 and 1.16 tested;
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Hi there, I'm investigating line coverage for a new feature that I'm introducing to Mbed TLS, and I'm seeing inconsistencies when it comes to line coverage (branch information seems fine):

line 1857 is hit, even though nothing executed it.
Reproduction steps:
Starting from here:
Check
library/x509_crt.ccoverage, line 1856 & 1857. The insides of the condition should not be hit.I reduced the number of tests run to one that highlights the problem.
If you're not able to run this test or you'd like me to produce a possibly minimal test case - let me know, I'll try harder :)
Tool versions:
lcov 1.14 and 1.16 tested;
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0