[PATCH, CHKP] Don't try to optimize bounds returned by strchr
Ilya Enkovich
enkovich.gnu@gmail.com
Mon Dec 8 10:05:00 GMT 2014
2014-12-06 1:55 GMT+03:00 Jeff Law <law@redhat.com>:
> On 12/02/14 06:40, Ilya Enkovich wrote:
>>
>> Hi,
>>
>> For strchr calls bounds of the first argument are considered as returned
>> which is wrong because NULL may be returned. This patch fixes that.
>> Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
>>
>> Thanks,
>> Ilya
>> --
>> 2014-12-02 Ilya Enkovich <ilya.enkovich@intel.com>
>>
>> * tree-chkp.c (chkp_build_returned_bound): Don't predict
>> return bounds for strchr calls.
>
> OK.
>
> Do you have a testcase you could add to the suite?
I cannot add a nice test for bounds returned by strchr for NULL until
it is wrapped (which will happen eventually).
Thanks,
Ilya
>
> Jeff
>
More information about the Gcc-patches
mailing list