diff --git a/src/f77/CMakeLists.txt b/src/f77/CMakeLists.txt index a76a5e4bf..ccef9639d 100644 --- a/src/f77/CMakeLists.txt +++ b/src/f77/CMakeLists.txt @@ -21,6 +21,11 @@ IF( CMAKE_COMPILER_IS_GNUCC ) MESSAGE( STATUS "adding -fno-range-check fortran compiler flag" ) SET( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-range-check" ) ENDIF() + IF ( ${GCC_VERSION} VERSION_GREATER 10 ) + # fix the BOZ literal constant errors that are treated more stringent + # starting from gcc10 (turns the errors into warnings) + SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-invalid-boz") + ENDIF() ENDIF() diff --git a/src/f77/simjob.F b/src/f77/simjob.F index 6864d6c7f..426e47c56 100644 --- a/src/f77/simjob.F +++ b/src/f77/simjob.F @@ -314,7 +314,7 @@ subroutine my_simjob status = lctphsetcellid( tpcHit, j-1 ) status = lctphsettime( tpcHit, 0.1234567 ) status = lctphsetcharge( tpcHit, 3.14159 ) - status = lctphsetquality( tpcHit, z'bad' ) + status = lctphsetquality( tpcHit, int(z'bad') ) if (storeRawData) then size = ( dble(irand( 0 ) )/RAND_MAX )*10 do k = 1,size diff --git a/src/f77/simjob_chain.F b/src/f77/simjob_chain.F index f8d23186c..81cb3df76 100644 --- a/src/f77/simjob_chain.F +++ b/src/f77/simjob_chain.F @@ -190,7 +190,7 @@ subroutine simjob ( ipass, filename ) !* c------ simulated tracker hits c-------- set the flag bits to store position and pdg for simulated calorimeter hits - flag = 2**31 + 2**28 + flag = (-2)**31 + 2**28 status = lccolsetflag( schcol, flag ) do k=1,nhit @@ -239,7 +239,7 @@ subroutine simjob ( ipass, filename ) !* c---- real data calorimeter hits c ---- set the flag bits to store position for calorimeter hits - flag = 2**31 + flag = (-2)**31 status = lccolsetflag( cahcol, flag ) do k=1,nhit