This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68893] New: [Coarray] Wrong result with -fcoarray=single and EVENTS
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Dec 2015 12:15:32 +0000
- Subject: [Bug fortran/68893] New: [Coarray] Wrong result with -fcoarray=single and EVENTS
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68893
Bug ID: 68893
Summary: [Coarray] Wrong result with -fcoarray=single and
EVENTS
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
The following program prints (with -fcoarray=single) "Value has been set", but
it should not print anything as the event variable has not been set.
It works with -fcoarray=lib.
program atomic
use iso_fortran_env
implicit none
type(event_type) :: event_value_has_been_set[*]
integer :: cnt
if (this_image() == 1) then
call event_query (event_value_has_been_set, cnt)
if (cnt > 0) write(*,*) "Value has been set"
elseif (this_image() == 2) then
event post (event_value_has_been_set[1])
end if
end program atomic