diff mbox series

[testsuite] : Fix gfortran.dg/coarray/event_3.f08 testcase (PR fortran/70696)

Message ID CAFULd4bqa8J76eytzhftoLRS0ORcUW6+2KgOydt0U=ynxwbEGA@mail.gmail.com
State New
Headers show
Series [testsuite] : Fix gfortran.dg/coarray/event_3.f08 testcase (PR fortran/70696) | expand

Commit Message

Uros Bizjak Jan. 27, 2019, 8:33 p.m. UTC
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  <ubizjak@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.

Comments

Thomas Koenig Jan. 27, 2019, 8:35 p.m. UTC | #1
Hi Uros,

> OK for mainline and release branches?

OK, and thanks for the patch.

(I would probably have considered this one obvious).

Regards

	Thomas
diff mbox series

Patch

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