@@ -464,7 +464,7 @@ pure function shift( idx, shift_by )
464464 type (stringlist_index_type), intent (in ) :: idx
465465 integer , intent (in ) :: shift_by
466466
467- type (stringlist_index_type), intent ( in ) :: shift
467+ type (stringlist_index_type) :: shift
468468
469469 shift = merge ( fidx( idx% offset + shift_by ), bidx( idx% offset + shift_by ), idx% forward )
470470
@@ -607,7 +607,7 @@ end subroutine insert_at_stringarray_idx_wrap
607607 ! > Modifies the input stringlist 'list'
608608 subroutine insert_before_engine ( list , idxn , positions )
609609 ! > Not a part of public API
610- class (stringlist_type), intent (inout ) :: list
610+ type (stringlist_type), intent (inout ) :: list
611611 integer , intent (inout ) :: idxn
612612 integer , intent (in ) :: positions
613613
@@ -744,8 +744,8 @@ end subroutine insert_before_stringarray_int_impl
744744 ! > Returns strings present at stringlist_indexes in interval ['first', 'last']
745745 ! > Stores requested strings in array 'capture_strings'
746746 ! > No return
747- subroutine get_engine ( list , first , last , capture_strings )
748- class (stringlist_type) :: list
747+ pure subroutine get_engine ( list , first , last , capture_strings )
748+ type (stringlist_type), intent ( in ) :: list
749749 type (stringlist_index_type), intent (in ) :: first, last
750750 type (string_type), allocatable , intent (out ) :: capture_strings(:)
751751
@@ -757,8 +757,7 @@ subroutine get_engine( list, first, last, capture_strings )
757757
758758 ! out of bounds indexes won't be captured in capture_strings
759759 if ( from <= to ) then
760- pos = to - from + 1
761- allocate ( capture_strings(pos) )
760+ allocate ( capture_strings( to - from + 1 ) )
762761
763762 inew = 1
764763 do i = from, to
@@ -779,8 +778,8 @@ end subroutine get_engine
779778 pure function get_idx_impl ( list , idx )
780779 class(stringlist_type), intent (in ) :: list
781780 type (stringlist_index_type), intent (in ) :: idx
782- type (string_type) :: get_idx_impl
783781
782+ type (string_type) :: get_idx_impl
784783 type (string_type), allocatable :: capture_strings(:)
785784
786785 call get_engine( list, idx, idx, capture_strings )
0 commit comments