Skip to content

Commit ec48c12

Browse files
committed
enable gfortran workaround for gcc <= 9
1 parent e5b03b6 commit ec48c12

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/csv_module.F90

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -966,19 +966,19 @@ subroutine get_column(me,icol,r,status_ok)
966966

967967
do i=1,me%n_rows ! row loop
968968

969-
! #if defined __GFORTRAN__
970-
! ! the following is a workaround for gfortran bugs:
971-
! select type (r)
972-
! type is (character(len=*))
973-
! tmp = repeat(' ',len(r)) ! size the string
974-
! call me%csv_get_value(i,icol,tmp,status_ok)
975-
! r(i) = tmp
976-
! class default
977-
! call me%csv_get_value(i,icol,r(i),status_ok)
978-
! end select
979-
! #else
969+
#if ( defined __GFORTRAN__ ) && ( __GNUC__ <= 9 )
970+
! the following is a workaround for gfortran bugs:
971+
select type (r)
972+
type is (character(len=*))
973+
tmp = repeat(' ',len(r)) ! size the string
974+
call me%csv_get_value(i,icol,tmp,status_ok)
975+
r(i) = tmp
976+
class default
977+
call me%csv_get_value(i,icol,r(i),status_ok)
978+
end select
979+
#else
980980
call me%csv_get_value(i,icol,r(i),status_ok)
981-
! #endif
981+
#endif
982982
if (.not. status_ok) then
983983
select type (r)
984984
! note: character conversion can never fail, so not

0 commit comments

Comments
 (0)