[PATCH] PR fortran/66942 -- avoid referencing a NULL C++ thing

Mikael Morin mikael.morin@sfr.fr
Thu Jul 30 14:41:00 GMT 2015


Le 29/07/2015 18:45, Steve Kargl a écrit :
> On Wed, Jul 29, 2015 at 02:04:12PM +0200, Richard Biener wrote:
>> On Wed, Jul 29, 2015 at 1:59 PM, Mikael Morin <mikael.morin@sfr.fr> wrote:
>>> Le 29/07/2015 13:22, Richard Biener a écrit :
>>>>
>>>> On Wed, Jul 29, 2015 at 11:34 AM, Mikael Morin <mikael.morin@sfr.fr>
>>>> wrote:
>>>>>
>>>>> Le 29/07/2015 10:26, Richard Biener a écrit :
>>>>>>>>
>>>>>>>>
>>>>>>>> Did you try using vec_safe_splice?
>>>>>>
>>>>>>
>>>>>>
>>>>>> That handles NULL retargs, not NULL or empty arglist.
>>>>>>
>>>>> I think retargs is NULL.
>>>>
>>>>
>>>> Not if the patch fixes anything.
>>>>
>>> The case retargs == NULL is the case arglen == 0, which means every vector
>>> pointer we are about to splice is NULL.
>>> So the patch fixes it.
>>
>> Ok, that wasn't obvious from reading the patch.
>>
>
> This builds and passes regression testing on x86_64-*-freebsd.
> OP found the problem by running the sanatizers.  I don't
> know how to build gcc with this as a build option.  I'll
> commit whichever diff you recommend.
>
I prefer this second variant.
OK for trunk without further comment from Richi.
Thanks.

Mikael



More information about the Gcc-patches mailing list