Hello!

As explained in PR70696, comment #17 [1], the referred testcase,
introduced as a testcase for PR70696, results in an uninitialized read
from x. Adding "save" attribute, as explained and required in the
comment #1, fixes the runtime failure for me.

2019-01-27  Uroš Bizjak  <ubiz...@gmail.com>

    PR fortran/70696
    * gfortran.dg/coarray/event_3.f0: Add save attribute to x.

Patch was tested on x86_64-linux-gnu and alphaev68-linux-gnu, where it
fixes the runtime failure.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696#c17

OK for mainline and release branches?

Uros.
Index: gfortran.dg/coarray/event_3.f08
===================================================================
--- gfortran.dg/coarray/event_3.f08     (revision 268248)
+++ gfortran.dg/coarray/event_3.f08     (working copy)
@@ -5,7 +5,7 @@
 program global_event
   use iso_fortran_env , only : event_type
   implicit none
-  type(event_type) :: x[*]
+  type(event_type), save :: x[*]
   
   call exchange
   contains

Reply via email to