Skip to content

Commit

Permalink
Michele Ceriottis fix for gfortran 8 compiler bug. Moved function def…
Browse files Browse the repository at this point in the history
…intion around.
  • Loading branch information
albapa committed Jul 20, 2018
1 parent fa52e88 commit 1eef739
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions fsys/fox_m_fsys_format.F90
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,32 @@ module fox_m_fsys_format

contains

#ifndef DUMMYLIB
pure function checkFmt(fmt) result(good)
character(len=*), intent(in) :: fmt
logical :: good

! should be ([rs]\d*)?

if (len(fmt) > 0) then
if (fmt(1:1) == "r" .or. fmt(1:1) == "s") then
if (len(fmt) > 1) then
good = (verify(fmt(2:), digit) == 0)
else
good = .true.
endif
else
good = .false.
endif
else
good = .true.
endif
end function checkFmt
#endif




#ifndef DUMMYLIB
! NB: The len generic module procedure is used in
! many initialisation statments (to set the
Expand Down Expand Up @@ -2086,29 +2112,6 @@ pure function str_complex_dp_matrix(ca) result(s)
#endif
end function str_complex_dp_matrix

#ifndef DUMMYLIB
pure function checkFmt(fmt) result(good)
character(len=*), intent(in) :: fmt
logical :: good

! should be ([rs]\d*)?

if (len(fmt) > 0) then
if (fmt(1:1) == "r" .or. fmt(1:1) == "s") then
if (len(fmt) > 1) then
good = (verify(fmt(2:), digit) == 0)
else
good = .true.
endif
else
good = .false.
endif
else
good = .true.
endif
end function checkFmt
#endif

pure function concat_str_int(s1, s2) result(s3)
character(len=*), intent(in) :: s1
integer, intent(in) :: s2
Expand Down

0 comments on commit 1eef739

Please sign in to comment.