Fix PR78154

Prathamesh Kulkarni prathamesh.kulkarni@linaro.org
Thu Nov 17 09:34:00 GMT 2016


On 17 November 2016 at 14:21, Richard Biener <rguenther@suse.de> wrote:
> On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote:
>
>> Hi Richard,
>> Following your suggestion in PR78154, the patch checks if stmt
>> contains call to memmove (and friends) in gimple_stmt_nonzero_warnv_p
>> and returns true in that case.
>>
>> Bootstrapped+tested on x86_64-unknown-linux-gnu.
>> Cross-testing on arm*-*-*, aarch64*-*-* in progress.
>> Would it be OK to commit this patch in stage-3 ?
>
> As people noted we have returns_nonnull for this and that is already
> checked.  So please make sure the builtins get this attribute instead.
OK thanks, I will add the returns_nonnull attribute to the required
string builtins.
I noticed some of the string builtins don't have RET1 in builtins.def:
strcat, strncpy, strncat have ATTR_NOTHROW_NONNULL_LEAF.
Should they instead be having ATTR_RET1_NOTHROW_NONNULL_LEAF similar
to entries for memmove, strcpy ?

Thanks,
Prathamesh
>
> Thanks,
> Richard.



More information about the Gcc-patches mailing list