This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH Fortran] Bug 79866 - diagnostics: typo in "Variable %s at %L of type EVENT_TYPE"


If there is no objection, I am planning to commit the following patch as obvious. 

Cheers, 

Dominique

2017-07-01 Dominique d'Humieres <dominiq@lps.ens.fr>

	PR fortran/79866
	* resolve.c (resolve_symbol): Fix typo.

2017-07-01 Dominique d'Humieres <dominiq@lps.ens.fr>

	PR testsuite/79866
	* gfortran.dg/coarray_event_2.f08: New test.

--- ../_clean/gcc/fortran/resolve.c	2017-05-22 19:20:08.000000000 +0200
+++ gcc/fortran/resolve.c	2017-06-29 16:10:27.000000000 +0200
@@ -14525,7 +14525,7 @@ resolve_symbol (gfc_symbol *sym)
       && !sym->attr.codimension && !sym->ts.u.derived->attr.coarray_comp)
     {
       gfc_error ("Variable %s at %L of type EVENT_TYPE or with subcomponent of "
-		 "type LOCK_TYPE must be a coarray", sym->name,
+		 "type EVENT_TYPE must be a coarray", sym->name,
 		 &sym->declared_at);
       return;
     }
--- ../_clean/gcc/testsuite/gfortran.dg/coarray_event_2.f08	1970-01-01 01:00:00.000000000 +0100
+++ gcc/testsuite/gfortran.dg/coarray_event_2.f08	2017-07-01 14:09:18.000000000 +0200
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -lcaf_single" }
+
+! Check that pr79866 is really fixed.
+
+  use iso_fortran_env
+  type(event_type) :: x ! { dg-error "of type EVENT_TYPE or with subcomponent of type EVENT_TYPE must be a coarray" }
+
+contains
+  subroutine exchange
+    event post (x[1]) ! { dg-error "Syntax error in EVENT POST statement at .1." }
+  end subroutine
+end 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]