[Patch] Fortran: add contiguous check for ptr assignment, fix non-contig check (PR97242)

Paul Richard Thomas paul.richard.thomas@gmail.com
Wed Sep 30 12:39:44 GMT 2020


Hi Tobias,

This looks good to me - OK for master.

Thanks for the patch

Paul


On Wed, 30 Sep 2020 at 09:59, Tobias Burnus <tobias@codesourcery.com> wrote:

> The non-contiguous had both check false positive and false
> negative results. Some more refinements
> are surely possible, but hopefully there are no longer
> false positives.
>
> I also now used this check for pointer assignments where the
> LHS pointer has the contiguous attribute.
>
> In the non-contiguous-check function:
> - for 'dt(i)%array' it returned true due to dt(i) but that's
>    an element, which is contiguous.
> - ref_size (which is a size) is compared with 'arr_size' calculated
>    via dep_difference,, which returns upper-lower but array size is
>    (upper-lower)+1.
> - fixed a memory leak.
>
> OK?
>
> Tobias
>
> -----------------
> Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München /
> Germany
> Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung,
> Alexander Walter
>


-- 
"If you can't explain it simply, you don't understand it well enough" -
Albert Einstein


More information about the Gcc-patches mailing list