Jacob Champion <jacob.champion@enterprisedb.com> writes:
> (I don't know the answer to this question, but I will note that clang
> (15.0.7) does not seem to make this mistake on my machine, and reports
> a call count of zero for the `return` on line 1495. Looking at the
> disassembly, it seems to add more instrumentation points than what Tom
> showed for gcc.)
Interesting. I also realized, after re-reading the snippet I showed,
that gcc is treating the code leading up to a CALL instruction as a
separate basic block from the code following the CALL. So that begs
the question of which count is shown for the function call's line
at the source-code level. It'd only differ when the function throws
an error, presumably.
regards, tom lane