re PR fortran/79866 (diagnostics: typo in "Variable %s at %L of type EVENT_TYPE")
authorDominique d'Humieres <dominiq@lps.ens.fr>
Mon, 3 Jul 2017 18:03:51 +0000 (20:03 +0200)
committerDominique d'Humieres <dominiq@gcc.gnu.org>
Mon, 3 Jul 2017 18:03:51 +0000 (20:03 +0200)
2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>

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

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

From-SVN: r249934

gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/coarray_event_2.f08 [new file with mode: 0644]

index 3d0b88c..692b8ff 100644 (file)
@@ -1,5 +1,10 @@
 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
 
+       PR fortran/79866
+       * resolve.c (resolve_symbol): Fix typo.
+
+2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
+
        PR fortran/79843
        * symbol.c (check_conflict): Add missing "conflicts".
 
index a5f4874..12903a4 100644 (file)
@@ -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;
     }
index 4c99694..681783f 100644 (file)
@@ -1,5 +1,10 @@
 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
 
+       PR testsuite/79866
+       * gfortran.dg/coarray_event_2.f08: New test.
+
+2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
+
        PR testsuite/79843
        * gfortran.dg/namelist_3.f90: Adjust the dg-error string.
        * gfortran.dg/pointer_intent_2.f90: Likewise.
diff --git a/gcc/testsuite/gfortran.dg/coarray_event_2.f08 b/gcc/testsuite/gfortran.dg/coarray_event_2.f08
new file mode 100644 (file)
index 0000000..20a37f3
--- /dev/null
@@ -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