Skip to content

Commit 9175258

Browse files
committed
revert workaround and try again.
1 parent b7d89d6 commit 9175258

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

src/json_value_module.F90

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,24 +1127,9 @@ subroutine json_matrix_info(json,p,is_matrix,var_type,n_sets,set_size,name)
11271127
integer(IK) :: icount !! number of elements in a set
11281128
integer :: i !! counter
11291129
integer :: j !! counter
1130-
#if defined __GFORTRAN__
1131-
character(kind=CK,len=:),allocatable :: p_name
1132-
#endif
11331130

11341131
!get info about the variable:
1135-
#if defined __GFORTRAN__
1136-
call json%info(p,vartype,nr)
1137-
if (present(name)) then !workaround for gfortran bug
1138-
if (allocated(p%name)) then
1139-
p_name = p%name
1140-
name = p_name
1141-
else
1142-
name = ''
1143-
end if
1144-
end if
1145-
#else
11461132
call json%info(p,vartype,nr,name)
1147-
#endif
11481133

11491134
is_matrix = (vartype==json_array)
11501135

@@ -1248,9 +1233,6 @@ subroutine json_matrix_info_by_path(json,p,path,is_matrix,found,&
12481233

12491234
type(json_value),pointer :: p_var
12501235
logical(LK) :: ok
1251-
#if defined __GFORTRAN__
1252-
character(kind=CK,len=:),allocatable :: p_name
1253-
#endif
12541236

12551237
call json%get(p,path,p_var,found)
12561238

@@ -1269,19 +1251,7 @@ subroutine json_matrix_info_by_path(json,p,path,is_matrix,found,&
12691251
else
12701252

12711253
!get info about the variable:
1272-
#if defined __GFORTRAN__
1273-
call json%matrix_info(p_var,is_matrix,var_type,n_sets,set_size)
1274-
if (present(name)) then !workaround for gfortran bug
1275-
if (allocated(p_var%name)) then
1276-
p_name = p_var%name
1277-
name = p_name
1278-
else
1279-
name = ''
1280-
end if
1281-
end if
1282-
#else
12831254
call json%matrix_info(p_var,is_matrix,var_type,n_sets,set_size,name)
1284-
#endif
12851255
if (json%failed() .and. present(found)) then
12861256
found = .false.
12871257
call json%clear_exceptions()

src/tests/jf_test_19.f90

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ subroutine test_19(error_cnt)
9494
end if
9595

9696
! now, test by path:
97-
#if defined __GFORTRAN__
98-
!stupid workaround for gfortran bugs
99-
name = ck_'Hello!' ! just assign something before calling info routine
100-
#endif
10197
call json%matrix_info(p,ck_'matrix',is_matrix,&
10298
var_type=var_type,n_sets=n_sets,&
10399
set_size=set_size,name=name)

0 commit comments

Comments
 (0)