Skip to content

Commit 9c03d16

Browse files
committed
Replaced go tos
Kreplaced go tos at the suggestion of Jeremie. [ticket: X]
1 parent 57faccd commit 9c03d16

File tree

1 file changed

+16
-32
lines changed

1 file changed

+16
-32
lines changed

src/tests/bitsets/test_stdlib_bitset_large.f90

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -851,57 +851,41 @@ subroutine test_bitset_inquiry()
851851

852852
call set10 % not()
853853
do i=0, set10 % bits() - 1
854-
if ( set10 % test(i) ) go to 500
854+
if ( set10 % test(i) ) then
855+
error stop procedure // ' against expectations set10 has ' // &
856+
'at least 1 bit set.'
857+
end if
855858
end do
856859

857860
write(*,*) 'As expected set10 had no bits set.'
858861

859-
go to 510
860-
861-
500 error stop procedure // ' against expectations set10 has ' // &
862-
'at least 1 bit set.'
863-
864-
510 continue
865-
866862
do i=0, set11 % bits() - 1
867-
if ( .not. set11 % test(i) ) go to 600
863+
if ( .not. set11 % test(i) ) then
864+
error stop procedure // ' against expectations set11 has ' // &
865+
'at least 1 bit unset.'
866+
end if
868867
end do
869868

870869
write(*,*) 'As expected set11 had all bits set.'
871870

872-
go to 610
873-
874-
600 error stop procedure // ' against expectations set11 has ' // &
875-
'at least 1 bit unset.'
876-
877-
610 continue
878-
879871
do i=0, set10 % bits() - 1
880-
if ( set10 % value(i) /= 0 ) go to 700
872+
if ( set10 % value(i) /= 0 ) then
873+
error stop procedure // ' against expectations set10 has ' // &
874+
'at least 1 bit set.'
875+
end if
881876
end do
882877

883878
write(*,*) 'As expected set10 had no bits set.'
884879

885-
go to 710
886-
887-
700 error stop procedure // ' against expectations set10 has ' // &
888-
'at least 1 bit set.'
889-
890-
710 continue
891-
892880
do i=0, set11 % bits() - 1
893-
if ( set11 % value(i) /= 1 ) go to 800
881+
if ( set11 % value(i) /= 1 ) then
882+
error stop procedure // ' against expectations set11 has ' // &
883+
'at least 1 bit unset.'
884+
end if
894885
end do
895886

896887
write(*,*) 'As expected set11 had all bits set.'
897888

898-
go to 810
899-
900-
800 error stop procedure // ' against expectations set11 has ' // &
901-
'at least 1 bit unset.'
902-
903-
810 continue
904-
905889
if ( set0 % bits() == 33 ) then
906890
write(*,*) 'set0 has 33 bits as expected.'
907891
else

0 commit comments

Comments
 (0)