Skip to content

Commit

Permalink
fix: fortran standard L needs a length
Browse files Browse the repository at this point in the history
nag compiler #615
  • Loading branch information
hkershaw-brown committed Jan 5, 2024
1 parent 49ed190 commit b52f340
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions assimilation_code/modules/utilities/assert_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
!> Aim: collection of assertions for use in test code
module assert_mod

use types_mod, only : r8, r4, i8

implicit none

public
Expand Down Expand Up @@ -37,7 +39,7 @@ module assert_mod
!-------------------------------
subroutine assert_equal_real(a, b, message)

real, intent(in) :: a, b
real(r4), intent(in) :: a, b
character(len=*), intent(in) :: message

if (a /= b) print*, 'FAIL: ', trim(message),' assertion ', a, '==', b, 'failed'
Expand Down Expand Up @@ -67,7 +69,7 @@ end subroutine assert_equal_int
!-------------------------------
subroutine assert_equal_int8(a, b, message)

integer*8, intent(in) :: a, b
integer(i8), intent(in) :: a, b
character(len=*), intent(in) :: message

if (a /= b) print*, 'FAIL: ', trim(message),' assertion ', a, '==', b, 'failed'
Expand Down Expand Up @@ -142,7 +144,7 @@ subroutine assert_equal_logical_array(a, b, message)

if (size(a) < 100) then
do i = 1,size(a)
write(*,'('' element('',i3,'') '',L,'' ?==? '',L)')i, a(i), b(i)
write(*,'('' element('',i3,'') '',L1,'' ?==? '',L1)')i, a(i), b(i)
enddo
else
print*, 'arrays too long to concisely specify where/how failed.'
Expand Down

0 comments on commit b52f340

Please sign in to comment.