Skip to content

Commit

Permalink
Make Fortran tests work with gcc10
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Oct 12, 2021
1 parent 43c4b7f commit 1287e94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/f77/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
2 changes: 1 addition & 1 deletion src/f77/simjob.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/f77/simjob_chain.F
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1287e94

Please sign in to comment.