Skip to content

Commit e06de4b

Browse files
author
Damian Rouson
committed
GCC 7/8 bug workaround: short (sub)module names
1 parent 7aafb20 commit e06de4b

File tree

6 files changed

+9
-20
lines changed

6 files changed

+9
-20
lines changed

src/tests/unit/teams/get-communicator.f90

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
program main
3131
!! summary: Test get_commiunicator function, an OpenCoarrays-specific language extension
3232
use opencoarrays, only : get_communicator
33+
use oc_assertions_interface, only : assert
3334

3435
implicit none
3536

@@ -99,16 +100,4 @@ subroutine mpi_matches_caf(comm)
99100

100101
end subroutine
101102

102-
elemental subroutine assert(assertion,description)
103-
!! TODO: move this to a common place for all tests to use
104-
logical, intent(in) :: assertion
105-
character(len=*), intent(in) :: description
106-
integer, parameter :: max_digits=12
107-
character(len=max_digits) :: image_number
108-
if (.not.assertion) then
109-
write(image_number,*) this_image()
110-
error stop "Assertion '" // description // "' failed on image " // trim(image_number)
111-
end if
112-
end subroutine
113-
114103
end program

src/tests/unit/teams/team-number.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ program main
3131
!! summary: Test team_number intrinsic function
3232
use iso_fortran_env, only : team_type
3333
use iso_c_binding, only : c_loc
34-
use opencoarrays_assertions_interface, only : assert
34+
use oc_assertions_interface, only : assert
3535

3636
implicit none
3737

src/tests/unit/teams/teams_subset.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ program teams_subset
33
!!
44
!! Regression test for prior potential deadlock in change team/end team
55
use iso_fortran_env, only : team_type
6-
use opencoarrays_assertions_interface, only : assert
6+
use oc_assertions_interface, only : assert
77
implicit none
88

99
type(team_type) team

src/tests/utilities/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ endif()
3333

3434
add_library( oc_test_interfaces OBJECT
3535
opencoarrays_object_interface.f90
36-
opencoarrays_assertions_interface.F90
36+
oc_assertions_interface.F90
3737
)
3838
add_library( opencoarrays_test_utilities
39-
opencoarrays_assertions_implementation.F90
39+
oc_assertions_implementation.F90
4040
$<TARGET_OBJECTS:oc_test_interfaces>
4141
)
4242
set_target_properties(opencoarrays_test_utilities

src/tests/utilities/opencoarrays_assertions_implementation.F90 renamed to src/tests/utilities/oc_assertions_implementation.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
submodule(opencoarrays_assertions_interface) opencoarrays_assertions_implementation
1+
submodule(oc_assertions_interface) oc_assertions_implementation
22
!! Define the assert procedure
33

44
implicit none
@@ -67,4 +67,4 @@ pure subroutine set(msg)
6767

6868
end procedure
6969

70-
end submodule opencoarrays_assertions_implementation
70+
end submodule oc_assertions_implementation

src/tests/utilities/opencoarrays_assertions_interface.F90 renamed to src/tests/utilities/oc_assertions_interface.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef USE_ASSERTIONS
22
# define USE_ASSERTIONS .false.
33
#endif
4-
module opencoarrays_assertions_interface
4+
module oc_assertions_interface
55
!! author: Damian Rouson
66
!!
77
!! Utility for runtime checking of logical assertions.
@@ -61,4 +61,4 @@ module subroutine assert(assertion,description,diagnostic_data,success,error_mes
6161
!! Optional informational message allocated only if assertion==.false. .and. present(success)
6262
end subroutine
6363
end interface
64-
end module opencoarrays_assertions_interface
64+
end module oc_assertions_interface

0 commit comments

Comments
 (0)