Hi All, Please find below a corrected ChangeLog.
Sorry that I didn't get it right first go. Paul Fortran: Assumed and explicit size class arrays [PR46691/99819]. 2021-05-06 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran/ChangeLog PR fortran/46691 PR fortran/99819 * class.c (gfc_build_class_symbol): Remove the error that disables assumed size class arrays. Class array types that are not deferred shape or assumed rank are given a unique name and placed in the procedure namespace. * trans-array.c (gfc_trans_g77_array): Obtain the data pointer for class arrays. (gfc_trans_dummy_array_bias): Suppress the runtime error for extent violations in explicit shape class arrays because it always fails. * trans-expr.c (gfc_conv_procedure_call): Handle assumed size class actual arguments passed to non-descriptor formal args by using the data pointer, stored as the symbol's backend decl. gcc/testsuite/ChangeLog PR fortran/46691 PR fortran/99819 * gfortran.dg/class_dummy_6.f90: New test. * gfortran.dg/class_dummy_7.f90: New test. On Thu, 6 May 2021 at 07:57, Paul Richard Thomas < paul.richard.tho...@gmail.com> wrote: > Hi All, > > Although I had undertaken to concentrate on PDTs, PR99819 so intrigued me > that I became locked into it :-( After extensive, fruitless rummaging > through decl.c and trans-decl.c, I realised that the problem was far > simpler than it seemed and that it lay in class.c. After that PR was fixed, > PR46691 was a trivial follow up. > > The comments in the patch explain the fixes. I left a TODO for the extent > checking of assumed size class arrays. I will try to fix it before pushing. > > Regtested on FC33/x86_64 and checked against the 'other brand'. OK for > 12-branch and, perhaps, 11-branch? > > Regards > > Paul > > Fortran: Assumed and explicit size class arrays [PR46691/99819]. > > 2021-05-06 Paul Thomas <pa...@gcc.gnu.org> > > gcc/fortran/ChangeLog > > PR fortran/46691 > PR fortran/99819 > * class.c (gfc_build_class_symbol): Class array types that are > not deferred shape or assumed rank are given a unique name and > placed in the procedure namespace. > * trans-array.c (gfc_trans_g77_array): Obtain the data pointer > for class arrays. > (gfc_trans_dummy_array_bias): Suppress the runtime error for > extent violations in explicit shape class arrays because it > always fails. > * trans-expr.c (gfc_conv_procedure_call): Handle assumed size > class actual arguments passed to non-descriptor formal args by > using the data pointer, stored as the symbol's backend decl. > > gcc/testsuite/ChangeLog > > PR fortran/46691 > PR fortran/99819 > * gfortran.dg/class_dummy_6.f90: New test. > * gfortran.dg/class_dummy_6.f90: New test. > > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein