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 3d0b88c9b667e089d72fc80391da6adb76834de1..692b8ff57f45af87af6ea24d2e7fc66e86f79518 100644 (file)
@@ -1,3 +1,8 @@
+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
index a5f4874d513bf7e772ee586fe1537192e57089d3..12903a4390a94dae462ab4db8f8f95acbeed9857 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 4c99694bf3aa0eedb8dbcdfd754d45d2a755d7b0..681783fa50c8441125e10d81be492fcbb7a24556 100644 (file)
@@ -1,3 +1,8 @@
+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
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