------- Comment #3 from burnus at gcc dot gnu dot org 2008-09-19 10:12 ------- program test real, pointer :: a(:), b(:) a(:) => b(:) end program test
That program is invalid. R735 pointer-assignment-stmt is data-pointer-object [ (bounds-spec-list) ] => data-target or data-pointer-object (bounds-remapping-list ) => data-target The remapping on the LHS is in principle OK, however, the lower bound is missing: R737 bounds-spec is lower-bound-expr : R738 bounds-remapping is lower-bound-expr : upper-bound-expr For pointer bounds-remapping, see PR 29785. * * * program test integer, pointer :: a(:),b(:) a(1) => b(1) end program test This is also invalid as "(1)" is not an array bound (neither lower-bound:upper-bound nor a "lower-bound:") but a single element. As "A" is a pointer to an array (and not an array of pointers) this is invalid. * * * I marked this as regression, but it is not a true regression as it was before only rejected because bound-specs where not allowed at all in earlier gfortran versions. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |accepts-invalid, ice-on- | |invalid-code Last reconfirmed|0000-00-00 00:00:00 |2008-09-19 10:12:15 date| | Summary|invalid code accepted |[4.3/4.4 Regression] Accepts |without notice |"pointer(:) => target" | |without lower bound http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37580