@@ -4724,8 +4724,10 @@ recursive subroutine parse_value(json, unit, str, value)
4724
4724
4725
4725
logical (LK) :: eof
4726
4726
character (kind= CK,len= 1 ) :: c
4727
+ #if defined __GFORTRAN__
4727
4728
character (kind= CK,len= :),allocatable :: tmp ! ! this is a work-around for a bug
4728
4729
! ! in the gfortran 4.9 compiler.
4730
+ #endif
4729
4731
4730
4732
if (.not. json% exception_thrown) then
4731
4733
@@ -4766,9 +4768,13 @@ recursive subroutine parse_value(json, unit, str, value)
4766
4768
4767
4769
select case (value% var_type)
4768
4770
case (json_string)
4769
- call json% parse_string(unit, str, tmp) ! write to a tmp variable because of
4770
- value% str_value = tmp ! a bug in 4.9 gfortran compiler.
4771
- deallocate (tmp) !
4771
+ #if defined __GFORTRAN__
4772
+ call json% parse_string(unit,str,tmp) ! write to a tmp variable because of
4773
+ value% str_value = tmp ! a bug in 4.9 gfortran compiler.
4774
+ deallocate (tmp) !
4775
+ #else
4776
+ call json% parse_string(unit, str, value% str_value)
4777
+ #endif
4772
4778
end select
4773
4779
4774
4780
case (CK_' t' ) ! true_str(1:1) gfortran bug work around
@@ -5343,8 +5349,10 @@ recursive subroutine parse_object(json, unit, str, parent)
5343
5349
type (json_value),pointer :: pair
5344
5350
logical (LK) :: eof
5345
5351
character (kind= CK,len= 1 ) :: c
5352
+ #if defined __GFORTRAN__
5346
5353
character (kind= CK,len= :),allocatable :: tmp ! ! this is a work-around for a bug
5347
5354
! ! in the gfortran 4.9 compiler.
5355
+ #endif
5348
5356
5349
5357
if (.not. json% exception_thrown) then
5350
5358
@@ -5366,9 +5374,13 @@ recursive subroutine parse_object(json, unit, str, parent)
5366
5374
return
5367
5375
else if (quotation_mark == c) then
5368
5376
call json_value_create(pair)
5369
- call json% parse_string(unit, str, tmp) ! write to a tmp variable because of
5370
- pair % name = tmp ! a bug in 4.9 gfortran compiler.
5377
+ #if defined __GFORTRAN__
5378
+ call json% parse_string(unit,str,tmp) ! write to a tmp variable because of
5379
+ pair% name = tmp ! a bug in 4.9 gfortran compiler.
5371
5380
deallocate (tmp)
5381
+ #else
5382
+ call json% parse_string(unit,str,pair% name)
5383
+ #endif
5372
5384
if (json% exception_thrown) then
5373
5385
call json% destroy(pair)
5374
5386
return
0 commit comments