Skip to content

Commit 23e1a1f

Browse files
committed
try gfortran-6 on travis.
1 parent da3cfbe commit 23e1a1f

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ addons:
1818
- kalakris-cmake
1919
- ubuntu-toolchain-r-test
2020
packages:
21-
- gfortran-5
21+
- gfortran-6
2222
- binutils
2323
- cmake
2424
- python-pip
@@ -53,10 +53,10 @@ install:
5353
mkdir "$HOME/.local/bin"
5454
fi
5555
- export PATH="$HOME/.local/bin:$PATH"
56-
- export FC=/usr/bin/gfortran-5
57-
- ln -fs /usr/bin/gfortran-5 "$HOME/.local/bin/gfortran" && gfortran --version
58-
- ls -l /usr/bin/gfortran-5
59-
- ln -fs /usr/bin/gcov-5 "$HOME/.local/bin/gcov" && gcov --version
56+
- export FC=/usr/bin/gfortran-6
57+
- ln -fs /usr/bin/gfortran-6 "$HOME/.local/bin/gfortran" && gfortran --version
58+
- ls -l /usr/bin/gfortran-6
59+
- ln -fs /usr/bin/gcov-6 "$HOME/.local/bin/gcov" && gcov --version
6060
- perl --version
6161
- |
6262
if ! which f90split; then

src/json_value_module.F90

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6963,17 +6963,17 @@ subroutine get_chars_from_array(json, element, i, count)
69636963
!size the output array:
69646964
if (.not. initialized) then
69656965
! string length long enough to hold the longest one
6966-
#if defined __GFORTRAN__
6967-
! this is a work-around for a bug
6968-
! in the gfortran 4.9 compiler.
6969-
call allocate_vec(max_len,count)
6970-
!block
6971-
! character(kind=CK,len=max_len),dimension(count) :: tmp_array
6972-
! vec = tmp_array
6973-
!end block
6974-
#else
6966+
!#if defined __GFORTRAN__
6967+
! ! this is a work-around for a bug
6968+
! ! in the gfortran 4.9 compiler.
6969+
! call allocate_vec(max_len,count)
6970+
! !block
6971+
! ! character(kind=CK,len=max_len),dimension(count) :: tmp_array
6972+
! ! vec = tmp_array
6973+
! !end block
6974+
!#else
69756975
allocate( character(kind=CK,len=max_len) :: vec(count) )
6976-
#endif
6976+
!#endif
69776977
initialized = .true.
69786978
end if
69796979

@@ -6990,20 +6990,20 @@ subroutine get_chars_from_array(json, element, i, count)
69906990

69916991
end subroutine get_chars_from_array
69926992

6993-
subroutine allocate_vec(max_len,count)
6994-
6995-
!! try to allocate on assignment to avoid gfortran bug.
6996-
6997-
implicit none
6998-
6999-
integer(IK),intent(in) :: max_len
7000-
integer(IK),intent(in) :: count
7001-
7002-
character(kind=CK,len=max_len),dimension(count) :: tmp_array
7003-
7004-
vec = tmp_array
7005-
7006-
end subroutine allocate_vec
6993+
!subroutine allocate_vec(max_len,count)
6994+
!
6995+
!!! try to allocate on assignment to avoid gfortran bug.
6996+
!
6997+
!implicit none
6998+
!
6999+
!integer(IK),intent(in) :: max_len
7000+
!integer(IK),intent(in) :: count
7001+
!
7002+
!character(kind=CK,len=max_len),dimension(count) :: tmp_array
7003+
!
7004+
!vec = tmp_array
7005+
!
7006+
!end subroutine allocate_vec
70077007

70087008
end subroutine json_get_alloc_string_vec
70097009
!*****************************************************************************************

0 commit comments

Comments
 (0)