Skip to content

Commit 627491f

Browse files
committed
trying a workaround for gfortran 4.9 allocatable string bugs.
1 parent 770a051 commit 627491f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/json_module.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,10 @@ recursive subroutine json_value_clone_func(from,to,parent,previous,next,children
10051005

10061006
!copy over the data variables:
10071007

1008-
if (allocated(from%name)) allocate(to%name, source=from%name)
1008+
if (allocated(from%name)) to%name = from%name
10091009
if (allocated(from%dbl_value)) allocate(to%dbl_value,source=from%dbl_value)
10101010
if (allocated(from%log_value)) allocate(to%log_value,source=from%log_value)
1011-
if (allocated(from%str_value)) allocate(to%str_value,source=from%str_value)
1011+
if (allocated(from%str_value)) to%str_value = from%str_value
10121012
if (allocated(from%int_value)) allocate(to%int_value,source=from%int_value)
10131013
to%var_type = from%var_type
10141014
to%n_children = from%n_children

0 commit comments

Comments
 (0)