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/78466] New: [coarray] Explicit cobounds of a procedures parameter not respected


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78466

            Bug ID: 78466
           Summary: [coarray] Explicit cobounds of a procedures parameter
                    not respected
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vehre at gcc dot gnu.org
  Target Milestone: ---

The testcase in gcc/testsuite/gfortran.dg/poly_run_2.f90 gives explicit
cobounds for the argument A to procedure s(). Those are not taken into account,
at least not in the way given (excerpt):

type t
end type t
class(t), allocatable :: A[:,:]
allocate (A[1:4,-5:*])
call s(A)
contains
subroutine s(x)
  class(t) :: x[4,2:*]
  if (any (lcobound(x) /= [1, 2])) call abort ()
  if (num_images() == 1) then
    if (any (ucobound(x) /= [4, 2])) call abort () ! Fails
  else
    if (ucobound(x,dim=1) /= 4) call abort ()
  end if
end subroutine s
end

Note: The testcase in general is made non-functional by the if(allocated(A))
stop as second line, as it is living in trunk upto r242691.

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