[Patch, fortran] PR fortran/100094 - Undefined pointers have incorrect rank when using optimization

Tobias Burnus tobias@codesourcery.com
Thu Apr 15 12:28:53 GMT 2021


On 15.04.21 13:56, José Rui Faustino de Sousa via Gcc-patches wrote:

> Proposed patch to:
> PR100094 - Undefined pointers have incorrect rank when using optimization
> Patch tested only on x86_64-pc-linux-gnu.

LGTM - thanks!

Tobias

> Pointers, and allocatables, must carry TKR information even when
> undefined. The patch adds code to initialize both pointers and
> allocatables element size, rank and type as soon as possible to do so.
> Latter initialization will work for allocatables, but not for pointers
> since one can not test meaningfully the association status of
> undefined pointers.
>
> Thank you very much.
>
> Best regards,
> José Rui
>
> Fortran: Add missing TKR initialization [PR100094]
>
> gcc/fortran/ChangeLog:
>
>     PR fortran/100094
>     * trans-array.c (gfc_trans_deferred_array): Add code to initialize
>     pointers and allocatables with correct TKR parameters.
>
> gcc/testsuite/ChangeLog:
>
>     PR fortran/100094
>     * gfortran.dg/PR100094.f90: New test.
>
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf


More information about the Gcc-patches mailing list