This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR fortran/66942 -- avoid referencing a NULL C++ thing
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Mikael Morin <mikael dot morin at sfr dot fr>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Jul 2015 10:26:25 +0200
- Subject: Re: [PATCH] PR fortran/66942 -- avoid referencing a NULL C++ thing
- Authentication-results: sourceware.org; auth=none
- References: <20150721190814 dot GA32735 at troutmask dot apl dot washington dot edu> <55B77DF4 dot 3070209 at sfr dot fr> <20150728131925 dot GA63678 at troutmask dot apl dot washington dot edu>
On Tue, Jul 28, 2015 at 3:19 PM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> On Tue, Jul 28, 2015 at 03:04:52PM +0200, Mikael Morin wrote:
>> Le 21/07/2015 21:08, Steve Kargl a ?crit :
>> > When C++ was injected into trans-expr.c in the form of vec,
>> > it seems whomever did the conversion to vec forgot to check
>> > for a NULL C++ thing. This patch seems to avoid the problem,
>> > but having zero knowledge of C++ I could be wrong.
>> >
>> > OK for trunk?
>> >
>> > 2015-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
>> >
>> > PR fortran/66942
>> > * trans-expr.c (gfc_conv_procedure_call): Avoid dereferencing NULL
>> > C++ thing.
>> >
>> Hello Steve,
>>
>> I believe the vec API should have all that is necessary to handle this
>> automatically.
>> Did you try using vec_safe_splice?
That handles NULL retargs, not NULL or empty arglist.
>
> I know zero about vec and I know zero about C++.
The patch looks ok to me.
Richard.
> --
> Steve