Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@
check_assertion: &
if (.not. assertion) then

#ifndef __flang__
associate(me=>this_image()) ! work around gfortran bug
header = 'Assertion "' // description // '" failed on image ' // string(me)
end associate
#else
header = 'Assertion "' // description // '" failed.'
#endif

represent_diagnostics_as_string: &
if (.not. present(diagnostic_data)) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ program designed_to_error_terminate

error_termination = exit_status /=0

#ifndef __flang__
call co_all(error_termination)

if (this_image()==1) then
#endif

if (error_termination) then
print *, "----> All tests designed to error-terminate pass. <----"
else
print *, "----> One or more tests designed to error-terminate terminated normally. Yikes! Who designed this OS? <----"
end if

#ifndef __flang__
end if
#endif

end block

Expand All @@ -40,11 +44,13 @@ pure function and_operation(lhs,rhs) result(lhs_and_rhs)

end function

#ifndef __flang__
subroutine co_all(boolean)
logical, intent(inout) :: boolean

call co_reduce(boolean, and_operation)

end subroutine
#endif

end program
5 changes: 4 additions & 1 deletion test/unit-tests/designed-to-terminate-normally.f90
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ program designed_to_terminate_normally

end block array_diagnostic_data

#ifndef __flang__
sync all

if (this_image()==1) print *, "----> All tests designed to terminate normally pass. <----"
if (this_image()==1) &
#endif
print *, "----> All tests designed to terminate normally pass. <----"

end program designed_to_terminate_normally