[Bug fortran/54753] assumed-rank dummies: Reject assumed-size actuals in in some cases (C535c; in F2018: C839)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54753 sandra at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #7 from sandra at gcc dot gnu.org --- This has been fixed except for the problem with deallocation/initialization of assumed-rank arrays now being tracked separately in PR102641.
[Bug fortran/54753] assumed-rank dummies: Reject assumed-size actuals in in some cases (C535c; in F2018: C839)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54753 --- Comment #6 from CVS Commits --- The master branch has been updated by Sandra Loosemore : https://gcc.gnu.org/g:7afb61087d2cb7a6d27463bab5a7567fac69f97a commit r12-4257-g7afb61087d2cb7a6d27463bab5a7567fac69f97a Author: Sandra Loosemore Date: Fri Oct 8 14:29:12 2021 -0700 Fortran: Add diagnostic for F2018:C839 (TS29113:C535c) 2021-10-08 Sandra Loosemore PR fortran/54753 gcc/fortran/ * interface.c (gfc_compare_actual_formal): Add diagnostic for F2018:C839. Refactor shared code and fix bugs with class array info lookup, and extend similar diagnostic from PR94110 to also cover class types. gcc/testsuite/ * gfortran.dg/c-interop/c535c-1.f90: Rewrite and expand. * gfortran.dg/c-interop/c535c-2.f90: Remove xfails. * gfortran.dg/c-interop/c535c-3.f90: Likewise. * gfortran.dg/c-interop/c535c-4.f90: Likewise. * gfortran.dg/PR94110.f90: Extend to cover class types.
[Bug fortran/54753] assumed-rank dummies: Reject assumed-size actuals in in some cases (C535c; in F2018: C839)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54753 --- Comment #5 from sandra at gcc dot gnu.org --- Patch to add the diagnostic posted here: https://gcc.gnu.org/pipermail/fortran/2021-October/056656.html There's still a problem with the bogus diagnostic arising from deallocation/initialization when you have just a subroutine definition instead of an interface. That has nothing to do with this diagnostic or other caller/callee argument mismatch so I opened a new issue (PR102641) for that.
[Bug fortran/54753] assumed-rank dummies: Reject assumed-size actuals in in some cases (C535c; in F2018: C839)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54753 --- Comment #4 from CVS Commits --- The master branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:51d9ef7747b2dc439f7456303f0784faf5cdb1d3 commit r12-4107-g51d9ef7747b2dc439f7456303f0784faf5cdb1d3 Author: Tobias Burnus Date: Mon Oct 4 09:38:43 2021 +0200 Fortran: Avoid var initialization in interfaces [PR54753] Intent(out) implies deallocation/default initialization; however, it is pointless to do this for dummy-arguments symbols of procedures which are inside an INTERFACE block. รข This also fixes a bogus error for the attached included testcase, but fixing the non-interface version still has to be done. PR fortran/54753 gcc/fortran/ChangeLog: * resolve.c (can_generate_init, resolve_fl_variable_derived, resolve_symbol): Only do initialization with intent(out) if not inside of an interface block.
[Bug fortran/54753] assumed-rank dummies: Reject assumed-size actuals in in some cases (C535c; in F2018: C839)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54753 sandra at gcc dot gnu.org changed: What|Removed |Added CC||sandra at gcc dot gnu.org --- Comment #3 from sandra at gcc dot gnu.org --- I've encountered problems related to this constraint in my WIP TS29113 testsuite, too. https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574115.html This is the types/c535c-*.f90 tests. The wording of the constraint is really confusing to me. I've parsed it to mean that the "it" being referred to as the subject of the requirements in the second half of the sentence is the actual argument, not the dummy argument. c535c-1 is emitting a nonsensical diagnostic on the subroutine definition instead of meaningful diagnostics at the invalid call sites. c535c-2 is failing to produce diagnostics. c535c-3 and c535c-4 are dying with internal compiler errors. Of course it is possible that my Fortran code is buggy as well as my parsing of the constraint. :-S
[Bug fortran/54753] assumed-rank dummies: Reject assumed-size actuals in in some cases (C535c; in F2018: C839)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54753 Tobias Burnus changed: What|Removed |Added Summary|assumed-rank dummies: |assumed-rank dummies: |Reject assumed-size actuals |Reject assumed-size actuals |in in some cases (C535c)|in in some cases (C535c; in ||F2018: C839) --- Comment #2 from Tobias Burnus --- In F2018: C839 If an assumed-size or nonallocatable nonpointer assumed-rank array is an actual argument that corres-19ponds to a dummy argument that is an INTENT (OUT) assumed-rank array, it shall not be polymorphic,20finalizable, of a type with an allocatable ultimate component, or of a type for which default initialization21is specified.