This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/56808] New: Coarray: Wrongly accepts coindexed arguments to INTENT(OUT) dummies


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56808

             Bug #: 56808
           Summary: Coarray: Wrongly accepts coindexed arguments to
                    INTENT(OUT) dummies
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Found at
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/-oUZRIdRCcg


For obvious reasons, the following is invalid, but it is accepted:

"If the actual argument is a coindexed object with an allocatable ultimate
component, the dummy argument shall have the INTENT (IN) or the VALUE
attribute." (12.5.2.4 Ordinary dummy variables)

 real(kind=4),allocatable :: grt(:,:,:)[:,:,:]
 call cgca_rt(grt(i,:,:)[1,1,1])
contains
 subroutine cgca_rt(r)
 real(kind=4),intent(out) :: r(3,3)
end
end


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]