From 7d66f442d66f7257648b8462f228952946656090 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 10 Feb 2019 20:43:51 +0000 Subject: [PATCH] Fix up some compiler errors when using gfortran v9 --- lib/ft8/chkcrc13a.f90 | 48 ++++++++++++++++---------------- lib/ft8/chkcrc14a.f90 | 48 ++++++++++++++++---------------- lib/ft8/extractmessage174.f90 | 4 +-- lib/ft8/extractmessage174_91.f90 | 4 +-- lib/msk40decodeframe.f90 | 2 +- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/lib/ft8/chkcrc13a.f90 b/lib/ft8/chkcrc13a.f90 index 74259cfcf..25e145842 100644 --- a/lib/ft8/chkcrc13a.f90 +++ b/lib/ft8/chkcrc13a.f90 @@ -1,24 +1,24 @@ -subroutine chkcrc13a(decoded,nbadcrc) - - use crc - integer*1 decoded(90) - integer*1, target:: i1Dec8BitBytes(12) - character*90 cbits - -! Write decoded bits into cbits: 77-bit message plus 13-bit CRC - write(cbits,1000) decoded -1000 format(90i1) - read(cbits,1001) i1Dec8BitBytes -1001 format(12b8) - read(cbits,1002) ncrc13 !Received CRC13 -1002 format(77x,b13) - - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32+16+8) - i1Dec8BitBytes(11:12)=0 - icrc13=crc13(c_loc(i1Dec8BitBytes),12) !CRC13 computed from 77 msg bits - - nbadcrc=1 - if(ncrc13.eq.icrc13) nbadcrc=0 - - return -end subroutine chkcrc13a +subroutine chkcrc13a(decoded,nbadcrc) + + use crc + integer*1 decoded(90) + integer*1, target:: i1Dec8BitBytes(12) + character*90 cbits + +! Write decoded bits into cbits: 77-bit message plus 13-bit CRC + write(cbits,1000) decoded +1000 format(90i1) + read(cbits,1001) i1Dec8BitBytes +1001 format(12b8) + read(cbits,1002) ncrc13 !Received CRC13 +1002 format(77x,b13) + + i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) + i1Dec8BitBytes(11:12)=0 + icrc13=crc13(c_loc(i1Dec8BitBytes),12) !CRC13 computed from 77 msg bits + + nbadcrc=1 + if(ncrc13.eq.icrc13) nbadcrc=0 + + return +end subroutine chkcrc13a diff --git a/lib/ft8/chkcrc14a.f90 b/lib/ft8/chkcrc14a.f90 index d9d3d7a4d..9ecda9b28 100644 --- a/lib/ft8/chkcrc14a.f90 +++ b/lib/ft8/chkcrc14a.f90 @@ -1,24 +1,24 @@ -subroutine chkcrc14a(decoded,nbadcrc) - - use crc - integer*1 decoded(91) - integer*1, target:: i1Dec8BitBytes(12) - character*91 cbits - -! Write decoded bits into cbits: 77-bit message plus 14-bit CRC - write(cbits,1000) decoded -1000 format(91i1) - read(cbits,1001) i1Dec8BitBytes -1001 format(12b8) - read(cbits,1002) ncrc14 !Received CRC14 -1002 format(77x,b14) - - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32+16+8) - i1Dec8BitBytes(11:12)=0 - icrc14=crc14(c_loc(i1Dec8BitBytes),12) !CRC14 computed from 77 msg bits - - nbadcrc=1 - if(ncrc14.eq.icrc14) nbadcrc=0 - - return -end subroutine chkcrc14a +subroutine chkcrc14a(decoded,nbadcrc) + + use crc + integer*1 decoded(91) + integer*1, target:: i1Dec8BitBytes(12) + character*91 cbits + +! Write decoded bits into cbits: 77-bit message plus 14-bit CRC + write(cbits,1000) decoded +1000 format(91i1) + read(cbits,1001) i1Dec8BitBytes +1001 format(12b8) + read(cbits,1002) ncrc14 !Received CRC14 +1002 format(77x,b14) + + i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) + i1Dec8BitBytes(11:12)=0 + icrc14=crc14(c_loc(i1Dec8BitBytes),12) !CRC14 computed from 77 msg bits + + nbadcrc=1 + if(ncrc14.eq.icrc14) nbadcrc=0 + + return +end subroutine chkcrc14a diff --git a/lib/ft8/extractmessage174.f90 b/lib/ft8/extractmessage174.f90 index 4bac6694d..252547c43 100644 --- a/lib/ft8/extractmessage174.f90 +++ b/lib/ft8/extractmessage174.f90 @@ -17,7 +17,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag) read(cbits,1002) ncrc12 !Received CRC12 1002 format(75x,b12) - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32) + i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32,0_1)) i1Dec8BitBytes(11)=0 icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits @@ -26,7 +26,7 @@ subroutine extractmessage174(decoded,msgreceived,ncrcflag) do ibyte=1,12 itmp=0 do ibit=1,6 - itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*6+ibit)) + itmp=ishft(itmp,1)+iand(1_1,decoded((ibyte-1)*6+ibit)) enddo i4Dec6BitWords(ibyte)=itmp enddo diff --git a/lib/ft8/extractmessage174_91.f90 b/lib/ft8/extractmessage174_91.f90 index d2d3019eb..ecc142469 100644 --- a/lib/ft8/extractmessage174_91.f90 +++ b/lib/ft8/extractmessage174_91.f90 @@ -17,7 +17,7 @@ subroutine extractmessage174_91(decoded,msgreceived,ncrcflag) read(cbits,1002) ncrc14 !Received CRC12 1002 format(77x,b14) - i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32+16+8) + i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),transfer(128+64+32+16+8,0_1)) i1Dec8BitBytes(11:12)=0 icrc14=crc14(c_loc(i1Dec8BitBytes),12) !CRC12 computed from 75 msg bits @@ -26,7 +26,7 @@ subroutine extractmessage174_91(decoded,msgreceived,ncrcflag) do ibyte=1,12 itmp=0 do ibit=1,6 - itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*6+ibit)) + itmp=ishft(itmp,1)+iand(1_1,decoded((ibyte-1)*6+ibit)) enddo i4Dec6BitWords(ibyte)=itmp enddo diff --git a/lib/msk40decodeframe.f90 b/lib/msk40decodeframe.f90 index 2023412ec..277f89de2 100644 --- a/lib/msk40decodeframe.f90 +++ b/lib/msk40decodeframe.f90 @@ -128,7 +128,7 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, & imsg=0 do i=1,16 - imsg=ishft(imsg,1)+iand(1,decoded(17-i)) + imsg=ishft(imsg,1)+iand(1_1,decoded(17-i)) enddo nrxrpt=iand(imsg,15) nrxhash=(imsg-nrxrpt)/16