[Patch, fortran V2] PR fortran/100097 PR fortran/100098 - [Unlimited] polymorphic pointers and allocatables have incorrect rank
José Rui Faustino de Sousa
Wed Jun 16 16:38:26 GMT 2021
Proposed patch to:
PR100097 - Unlimited polymorphic pointers and allocatables have
PR100098 - Polymorphic pointers and allocatables have incorrect rank
Patch tested only on x86_64-pc-linux-gnu.
Version 2 no longer re-initializes explicit initialized variables, which
are taken care of elsewhere.
Pointers, and allocatables, must carry TKR information even when
undefined. The patch adds code to initialize, for both pointers and
allocatables, the class descriptor element size, rank and type as soon
as possible to do so.
Thank you very much.
Fortran: Add missing TKR initialization to class variables [PR100097,
* trans-array.c (gfc_trans_class_array): new function to
initialize class descriptor's TKR information.
* trans-array.h (gfc_trans_class_array): add function prototype.
* trans-decl.c (gfc_trans_deferred_vars): add calls to the new
function for both pointers and allocatables.
* gfortran.dg/PR100097.f90: New test.
* gfortran.dg/PR100098.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5350 bytes
Desc: not available
More information about the Gcc-patches