Pushed as r16-3481.

Thanks for your help in getting it over the line!

Paul


On Sun, 31 Aug 2025 at 12:45, Paul Richard Thomas <
paul.richard.tho...@gmail.com> wrote:

> Hi Harald and Jerry,
>
> As it happens, I had done the regtesting, caught the failures of
> value_optional_[1-2].f90 but failed to update the .diff for submission. Mea
> culpa for not checking the submission.
>
> More importantly, I forgot to deallocate the parameterized components -
> see the attachment. Unlike the dereferencing error, this might have sat
> undetected for a long time
>
> This version has been regtested :-) I will push to mainline later today
> unless there are any objections.
>
> Thanks
>
> Paul
>
>
> On Sat, 30 Aug 2025 at 18:34, Harald Anlauf <anl...@gmx.de> wrote:
>
>> Am 30.08.25 um 18:22 schrieb Jerry D:
>> > On 8/30/25 9:16 AM, Harald Anlauf wrote:
>> >> On 8/30/25 18:04, Jerry D wrote:
>> >>> On 8/30/25 8:04 AM, Paul Richard Thomas wrote:
>> >>>> Hi All,
>> >>>>
>> >>>> This patch is only a temporary fix because the chunks in trans-
>> >>>> array.cc are representation dependent. As a whole, the patch is so
>> >>>> straightforward that the ChangeLog serves as an explanation.
>> >>>>
>> >>>> Regtests with FC32/x86_64 - OK for mainline?
>> >>>>
>> >>>> Paul
>> >>>
>> >>> Yes, OK and thanks for the fix.
>> >>>
>> >>> Regards,
>> >>>
>> >>> Jerry
>> >>>
>> >>
>> >> Actually - and obviously - it is NOT OK.  It fails here on
>> >>
>> >> gfortran.dg/value_optional_1.f90
>> >> gfortran.dg/value_optional_2.f90
>> >>
>> >> because of the new non-caught NULL-pointer dereference here:
>> >>
>> >> diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
>> >> index 69952b33eaa..771d2c24fa9 100644
>> >> --- a/gcc/fortran/trans-expr.cc
>> >> +++ b/gcc/fortran/trans-expr.cc
>> >> @@ -6520,6 +6520,18 @@ conv_dummy_value (gfc_se * parmse, gfc_expr *
>> >> e, gfc_symbol * fsym,
>> >>
>> >>     gcc_assert (fsym && fsym->attr.value && !fsym->attr.dimension);
>> >>
>> >> +  if (e->ts.type == BT_DERIVED && e->ts.u.derived->attr.pdt_type)
>> >>
>> >> Note that e == NULL for a missing actual argument, so you need to
>> >> check for this case.
>> >>
>> >> Thanks,
>> >> Harald
>> >>
>> >
>> > oops,  reviewed and did not apply and test. my bad.
>>
>> Yes, happens all the time ... ;-)
>>
>> (Seems that Paul short-cut the regtesting.)
>>
>> I just happen to know these testcases very well.
>>
>> > Jerry
>> >
>>
>>

Reply via email to