Skip to content

Commit

Permalink
Protect access to fptr() pointer even more strongly (since NAG does n…
Browse files Browse the repository at this point in the history
…ot like it).
  • Loading branch information
theurich committed Oct 25, 2024
1 parent 4f27d4a commit a6e7c07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AtmOcnScalarProto/atm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ subroutine Advance(model, rc)
file=__FILE__)) &
return ! bail out
! access the scalars through a 1D array
scalars => fptr(:,1)
if (size(fptr)>0) then
! only use fptr on that PET which holds allocation
scalars => fptr(:,1)
do i=lbound(scalars,1), ubound(scalars,1)
scalars(i)=(i-1)*10+step
enddo
Expand Down

0 comments on commit a6e7c07

Please sign in to comment.