https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104585
Bug ID: 104585 Summary: incorrect error for dummy arguments with both VALUE and DIMENSION attributes Product: gcc Version: og11 (devel/omp/gcc-11) Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: a.shahmoradi at gmail dot com Target Milestone: --- The following interface conforms to Fortran 2008/2018 standards but is not recognized by gfortran, which seems to still follow the rules of Fortran2003 in this regard. ``` interface function test(Matrix) result(res) real, value :: Matrix(:,:) ! valid F2008 (although invalid F2003). real :: res end function end interface end ``` This enhancement requires lifting an existing restriction to allow `value` attribute with array-like dummy arguments in agreement with F2008/F2018 standards. The additional relevant discussion is also available in Fortran Discourse: https://fortran-lang.discourse.group/t/value-with-dimension-attribute-conflict/2808