This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi All, This is a complete rework of the patch and of the original mechanism for adding caf token fields and finding them. In this patch, the token fields are added to the derived types after all the components have been resolved. This is done so that all the tokens appear at the very end of the derived type, including the hidden string lengths. This avoids the present situation, where the token appears immediately after its associated component such that the the derived types are not compatible with modules or libraries compiled without -fcoarray selected. All trans-types has to do now is to find the component and have the component token field point to its backend_decl. PR83319 is fixed by unconditionally adding the token field to the descriptor, when -fcoarray=lib whatever the value of codimen. This is something of a belt-and-braces approach, in that the token fields will sometimes be added when not needed. However, it is better that than the ICEs that occur when they are missing. Bootstrapped and regtested on FC23/x86_64 - OK for trunk and 7-branch? Paul 2017-12-26 Paul Thomas <pault@gcc.gnu.org> PR fortran/83076 * resolve.c (resolve_fl_derived0): Add caf_token fields for allocatable and pointer scalars, when -fcoarray selected. * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token field as well as the backend_decl. (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module derived types that are not vtypes. Components with caf_token attribute are pvoid types. For a component requiring it, find the caf_token field and have the component token field point to its backend_decl. PR fortran/83319 *trans-types.c (gfc_get_array_descriptor_base): Add the token field to the descriptor even when codimen not set. 2017-12-26 Paul Thomas <pault@gcc.gnu.org> PR fortran/83076 * gfortran.dg/coarray_45.f90 : New test. PR fortran/83319 * gfortran.dg/coarray_46.f90 : New test. On 3 December 2017 at 23:48, Dominique d'Humières <dominiq@tournesol.lps.ens.fr> wrote: > Dear Paul, > >> Bootstrapped and regtested on FC23/x86_64 - OK for trunk? > > See my comment 7 in the PR. > > Dominique > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein
Attachment:
submit.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |