https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89961

--- Comment #18 from xaizek <xaizek at posteo dot net> ---
> The following 2 files should be created (right now b.gcov.json.gz and
> a.gcov.json.gz are created)
> 
> b.gcov.json.gz
> src/a.gcov.json.gz
> 
> and so -p and -x does not play any role here.

Now you'll need to search for output recursively, but this will fix the issue,
although I'm not sure what will happen if you run `gcov` outside of build tree
(I remember the docs, but isn't intermediate format is more usable because it
doesn't need sources and so the restriction on where to run `gcov` doesn't
apply?).

I still don't understand why not just make `-p` and `-x` work?  The options
are there anyway.

By the way, I worked around the issue in May by not invoking `gcov` with two
files that are named identically.  It works even with GCC 8 for me (although
not
in one call), but people will continue to use `-p` and `-x` and get surprising
results.

Reply via email to