Skip to content

Commit 181862d

Browse files
committed
Fixes #119 - workaround for Intel 2021 bug.
1 parent e2aaa0d commit 181862d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

include/templates/vector_impl.inc

+8-7
Original file line numberDiff line numberDiff line change
@@ -583,18 +583,19 @@
583583
type (__iterator), intent(in) :: first
584584
type (__iterator), intent(in) :: last
585585

586-
integer :: i, delta
586+
integer :: i, d
587587

588-
delta=last%currentindex-first%currentindex
588+
d = last%currentindex-first%currentindex
589589
do i=last%currentIndex, this%vsize
590-
associate(a => this%elements(i-delta),b =>this%elements(i))
591-
__TYPE_MOVE(__GET(a),__GET(b))
592-
end associate
590+
! Workaround for Intel 2021.1
591+
! Defect report has been submitted to Intel.
592+
! Indentation is critical here.
593+
__TYPE_MOVE(__GET(this%elements(i-d)),__GET(this%elements(i)))
593594
end do
594-
do i = this%vsize - delta + 1, last%currentIndex - 1
595+
do i = this%vsize - d + 1, last%currentIndex - 1
595596
__TYPE_FREE(__GET(this%elements(i)))
596597
end do
597-
this%vsize=this%vsize-delta
598+
this%vsize=this%vsize-d
598599

599600
return
600601
end subroutine __PROC(erase_range)

0 commit comments

Comments
 (0)