Skip to content

Commit 94a59d3

Browse files
committed
attempted workaround for gfortran bugs.
1 parent 4275a88 commit 94a59d3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/json_value_module.F90

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4931,7 +4931,21 @@ subroutine duplicate_key_func(json,p,finished)
49314931
type(json_value),pointer,intent(in) :: p
49324932
logical(LK),intent(out) :: finished
49334933

4934+
#if defined __GFORTRAN__
4935+
4936+
character(kind=CK,len=:),allocatable :: tmp_name !! workaround for gfortran bugs
4937+
character(kind=CK,len=:),allocatable :: tmp_path !! workaround for gfortran bugs
4938+
4939+
call json%check_children_for_duplicate_keys(p,has_duplicate,tmp_name,tmp_path)
4940+
4941+
if (has_duplicate) then
4942+
if (present(name)) name = tmp_name
4943+
if (present(path)) path = tmp_path
4944+
end if
4945+
4946+
#else
49344947
call json%check_children_for_duplicate_keys(p,has_duplicate,name,path)
4948+
#endif
49354949

49364950
finished = has_duplicate .or. json%exception_thrown
49374951

0 commit comments

Comments
 (0)