Skip to content

Commit 535d857

Browse files
committed
attempted fix for gfortran bug.
1 parent 23755c9 commit 535d857

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/json_value_module.F90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6963,8 +6963,16 @@ subroutine get_chars_from_array(json, element, i, count)
69636963
!size the output array:
69646964
if (.not. initialized) then
69656965
! string length long enough to hold the longest one
6966+
#if defined __GFORTRAN__
6967+
! this is a work-around for a bug
6968+
! in the gfortran 4.9 compiler.
6969+
block
6970+
character(kind=CK,len=max_len),dimension(count) :: tmp_array
6971+
vec = tmp_array
6972+
end block
6973+
#else
69666974
allocate( character(kind=CK,len=max_len) :: vec(count) )
6967-
!allocate( ilen(count) )
6975+
#endif
69686976
initialized = .true.
69696977
end if
69706978

0 commit comments

Comments
 (0)