Pure procedure inout argument gives error on assignment when using associate construct

Pure procedure inout argument gives error on assignment when using associate construct

This is an extract of the code:

 pure subroutine calculateAdvancedContactStressContact(aContactPair)
   type(ContactPairType), intent(inout) :: aContactPair
   integer j
   real(8) deltaVec(3)
   deltaVec(1) = 1.0D0
   deltaVec(2:3) = 0.0D0
   associate(aRegion => aContactPair%sides(1)%region)
      do j = 1, size(aRegion%contactRegions)
         associate(def => aRegion%contactRegions(j)%deflection)
            def%vector(1:3)%v = def%vector(1:3)%v - deltaVec
         end associate
      end do
   end associate
end subroutine 

<!--break-->

The error message is:

1>Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [Intel(R) 64]...

1>ContactPair.f90

1>D:\dev\r14.5.1\Components\Source\Romax\StaticAnalysisServer\ContactPair.f90(103): error #7617: This host associated object appears in a 'defining' context in a PURE procedure or in an internal procedure contained in a PURE procedure.   [DEF]

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks - I have escalated this as issue DPD200241067. [Edit to correct issue number.]

Steve - Intel Developer Support

I expect the fix for this to appear in update 3.

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today