Skip to content

"Array access to function call" directive crashes on subprograms #595

@FrostyMike

Description

@FrostyMike
!
! This file is released under terms of BSD license
! See LICENSE file for more information
!
! Simple program to test the kcache directive
!

PROGRAM claw_test

  INTEGER :: istart = 0
  INTEGER :: iend = 10
  INTEGER :: jstart = 0
  INTEGER :: jend = 20
  CALL call_test(istart,iend,jstart,jend)
contains

PURE FUNCTION f(i,j)
  INTEGER, INTENT(IN) :: i,j
  REAL :: f
  f = 1.0 * i * j
END FUNCTION

SUBROUTINE call_test(istart,iend,jstart,jend)
  INTEGER, INTENT(IN) :: istart, iend, jstart, jend
  INTEGER :: i,j
  REAL, DIMENSION(istart:iend,istart:iend) :: array6, array7

  DO i = istart, iend
    DO j = jstart, jend
      array6(i,j) = 1.0 * i * j
    END DO
  END DO

  DO i = istart, iend
    DO j = jstart, jend
      !$claw call array6=f(i,j)
      array7(i,j) = array6(i,j) * 2.0
    END DO
  END DO
END SUBROUTINE call_test

END PROGRAM claw_test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions