On 09/27/2016 01:32 PM, Nathan Sidwell wrote:
> On 09/27/16 07:26, Martin Liška wrote:
>> Following patch prevents emission of gcno file (notes file) for statements
>> that do not point to original source file, like:
>>
>> $ echo "int main(){}" > x.c
>>
>> In this case the location points to a builtin.
>>
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> Ready to be installed?
>
> I'm sure this is sensible. Is there a difficulty with a testcase -- what
> exactly is the failure mode?
Second version of the patch adds validation to gcov.exp, where $result is
scanned for "File '<built-in>'".
Luckily current test-case hit that verification:
FAIL: gcc.misc-tests/gcov-6.c gcov failed: <built-in>.gcov should not be created
FAIL: gcc.misc-tests/gcov-7.c gcov failed: <built-in>.gcov should not be created
>
> One thing I dislike is negated predicates though -- I think I'd find
> if (!gimple_has_reserved_location (gs))
> to be more understandable (particularly as that matches the sense of
> RESERVED_LOCATION_P.
Agree with you, renamed to gimple_has_reserved_location.
Ready with that change?
Martin
>
> Richard?
>
> nathan
>