Hi Harald,

The patch is good for mainline.

The PDT testcase is invalid because the component has a fixed length
initializer, while its length is a len parameter. One of the fixes that I
will have to do in the PDT revamp. Ignore it for now.

Thanks for the patch.

Paul




On Thu, 29 Aug 2024 at 21:30, Harald Anlauf <anl...@gmx.de> wrote:

> Dear all,
>
> the attached, rather simple patch adds the missing default-initialization
> of non-pointer, non-allocatable derived-type function results.
>
> Regtested ok on x86_64-pc-linux-gnu, but needed two adjustments in the
> testsuite.  One of them is easily explained by the fix, but the other
> one to gfortran.dg/pdt_26.f03 makes me scratch my head.
>
> The patch adds default-initialization and thus changes the count of
> __builtin_malloc in the tree dump, but not the __builtin_free count.
>
> Running the testcase under valgrind shows that no memleak occurs at
> -O1 and higher, but I get a minor leak at -O0 and -Og.
>
> The dump tree is the same at -O0 and -O1, which is nice.
>
> Any suggestions how to proceed?
>
> And is the patch OK for mainline?  The PDT implementation may have
> latent issues, but that is just a guess.
>
> Thanks,
> Harald
>
>

Reply via email to