Skip to content

Commit 2045bce

Browse files
committed
a minor change to work around a possible compiler bug in Gfortran
Fixes #597
1 parent 17f6d2f commit 2045bce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/json_file_module.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ subroutine json_file_check_for_errors(me,status_ok,error_msg)
449449
#if defined __GFORTRAN__
450450
character(kind=CK,len=:),allocatable :: tmp !! workaround for gfortran bugs
451451
call me%core%check_for_errors(status_ok,tmp)
452-
if (present(error_msg)) error_msg = tmp
452+
if (present(error_msg)) call move_alloc(tmp, error_msg)
453453
#else
454454
call me%core%check_for_errors(status_ok,error_msg)
455455
#endif

0 commit comments

Comments
 (0)