@@ -1222,6 +1222,9 @@ subroutine json_matrix_info_by_path(json,p,path,is_matrix,found,&
1222
1222
1223
1223
type (json_value),pointer :: p_var
1224
1224
logical (LK) :: ok
1225
+ #if defined __GFORTRAN__
1226
+ character (kind= CK,len= :),allocatable :: p_name ! ! for getting the name
1227
+ #endif
1225
1228
1226
1229
call json% get(p,path,p_var,found)
1227
1230
@@ -1239,7 +1242,17 @@ subroutine json_matrix_info_by_path(json,p,path,is_matrix,found,&
1239
1242
if (present (name)) name = ' '
1240
1243
else
1241
1244
! get info:
1245
+
1246
+ ! get info about the variable:
1247
+ #if defined __GFORTRAN__
1248
+ ! [note: passing name directory to this routine seems
1249
+ ! to have a bug on older gfortran versions...
1250
+ call json% matrix_info(p_var,is_matrix,var_type,n_sets,set_size,p_name)
1251
+ if (present (name)) name = p_name
1252
+ if (allocated (p_name)) deallocate (p_name)
1253
+ #else
1242
1254
call json% matrix_info(p_var,is_matrix,var_type,n_sets,set_size,name)
1255
+ #endif
1243
1256
if (json% failed() .and. present (found)) then
1244
1257
found = .false.
1245
1258
call json% clear_exceptions()
0 commit comments