The test program gives the message: c_tests_cg0018.f:28.20: TLA1L(NFV1) = UDA1R 1 Error: Can't convert TYPE(seq) to TYPE(unseq) at (1)
Where NFV1 is an integer scalar array. I believe the error is incorrect. This is from the SHAPE95 test suite. This test was contentious during the suite development and at least one vendor almost submitted an interpretation request. I believe that lines 27 to 30 of page 110 say that elemental defined assignments are processed element-by-element, in any order, so that it's as if things were written TLA1L(3) = UDA1R(3) TLA1L(7) = UDA1R(7) .... and those assignments are perfectly well defined (and gfortran accepts similar ones). Additionally, assignments like real_array(NFV1) = some_other_array are well defined (with a restriction on NFV1's values). That's the gist of the argument as I remember it from 10 years ago. The sample program is MODULE c_TESTS integer, save :: nfv1(10) TYPE UNSEQ REAL R END TYPE UNSEQ TYPE SEQ sequence REAL R END TYPE SEQ INTERFACE ASSIGNMENT(=) MODULE PROCEDURE C_U_TO_T END INTERFACE ASSIGNMENT(=) CONTAINS ELEMENTAL PURE SUBROUTINE C_U_TO_T(T,U) TYPE(SEQ),INTENT(IN) :: U TYPE(UNSEQ), INTENT(OUT) :: T T%R = U%R END SUBROUTINE C_U_TO_T SUBROUTINE CG1018(UDA1R) TYPE(UNSEQ) TLA1L(10) TYPE(SEQ) UDA1R(10) TLA1L(NFV1) = UDA1R END SUBROUTINE END MODULE c_TESTS -- Summary: defined assignment not allowed to vector subscripted array Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dick dot hendrickson at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34805