Skip to content

Commit 46f312d

Browse files
committed
Add testcase for issue #762.
1 parent dfde1b9 commit 46f312d

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ if(opencoarrays_aware_compiler)
925925
endif()
926926

927927
add_caf_test(issue-700-allow-multiple-scalar-dim-array-gets 2 issue-700-allow-multiple-scalar-dim-array-gets)
928+
add_caf_test(issue-762-mpi-crashing-on-exit 2 issue-762-mpi-crashing-on-exit)
928929

929930
# IMAGE FAIL tests
930931
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0)

src/tests/regression/reported/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ caf_compile_executable(issue-700-allow-multiple-scalar-dim-array-gets issue-700-
1616
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0))
1717
caf_compile_executable(issue-515-mimic-mpi-gatherv issue-515-mimic-mpi-gatherv.f90)
1818
endif()
19+
caf_compile_executable(issue-762-mpi-crashing-on-exit issue-762-mpi-crashing-on-exit.f90)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
program hello_coarrays
2+
implicit none
3+
type :: array_type
4+
integer, allocatable :: values(:)
5+
end type
6+
type(array_type) :: array[*]
7+
allocate(array%values(2), source=0)
8+
array%values = this_image()
9+
if (all(array%values(:) .EQ. this_image())) then
10+
print *,"Test passed."
11+
end if
12+
end program
13+

0 commit comments

Comments
 (0)