[PATCH] Fix PR gcov-profile/46266

Martin Liška mliska@suse.cz
Tue Sep 27 12:48:00 GMT 2016


On 09/27/2016 02:45 PM, Martin Liška wrote:
> 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
>>
> 

Adding missing patch.

M.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-PR-gcov-profile-46266-v2.patch
Type: text/x-patch
Size: 4109 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160927/892890fb/attachment.bin>


More information about the Gcc-patches mailing list