From: Dominique d'Humieres Date: Mon, 3 Jul 2017 18:03:51 +0000 (+0200) Subject: re PR fortran/79866 (diagnostics: typo in "Variable %s at %L of type EVENT_TYPE") X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=370d975d77562e4f38738cfb7bcb16afa9aeabfb;p=gcc.git re PR fortran/79866 (diagnostics: typo in "Variable %s at %L of type EVENT_TYPE") 2017-07-03 Dominique d'Humieres PR fortran/79866 * resolve.c (resolve_symbol): Fix typo. PR testsuite/79866 * gfortran.dg/coarray_event_2.f08: New test. From-SVN: r249934 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3d0b88c9b66..692b8ff57f4 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2017-07-03 Dominique d'Humieres + + PR fortran/79866 + * resolve.c (resolve_symbol): Fix typo. + 2017-07-03 Dominique d'Humieres PR fortran/79843 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index a5f4874d513..12903a4390a 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -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; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c99694bf3a..681783fa50c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-07-03 Dominique d'Humieres + + PR testsuite/79866 + * gfortran.dg/coarray_event_2.f08: New test. + 2017-07-03 Dominique d'Humieres 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 index 00000000000..20a37f332fb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_event_2.f08 @@ -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