re PR fortran/91496 (!GCC$ directives error if mistyped or unknown)
authorHarald Anlauf <anlauf@gmx.de>
Thu, 5 Sep 2019 20:13:00 +0000 (20:13 +0000)
committerHarald Anlauf <anlauf@gcc.gnu.org>
Thu, 5 Sep 2019 20:13:00 +0000 (20:13 +0000)
2019-09-05  Harald Anlauf  <anlauf@gmx.de>

PR fortran/91496
* parse.c (parse_executable): Improve error messages for
improperly placed pragmas not preceeding a loop.

PR fortran/91496
* gfortran.dg/directive_unroll_5.f90: Adjust error message.

From-SVN: r275442

gcc/fortran/ChangeLog
gcc/fortran/parse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/directive_unroll_5.f90

index 129bfdd..9c787f7 100644 (file)
@@ -1,3 +1,9 @@
+2019-09-05  Harald Anlauf  <anlauf@gmx.de>
+
+       PR fortran/91496
+       * parse.c (parse_executable): Improve error messages for
+       improperly placed pragmas not preceeding a loop.
+
 2019-09-05  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/91660
index caea16b..5bd04b8 100644 (file)
@@ -5541,16 +5541,17 @@ parse_executable (gfc_statement st)
        }
 
       if (directive_unroll != -1)
-       gfc_error ("%<GCC unroll%> directive does not commence a loop at %C");
+       gfc_error ("%<GCC unroll%> directive not at the start of a loop at %C");
 
       if (directive_ivdep)
-       gfc_error ("%<GCC ivdep%> directive does not commence a loop at %C");
+       gfc_error ("%<GCC ivdep%> directive not at the start of a loop at %C");
 
       if (directive_vector)
-       gfc_error ("%<GCC vector%> directive does not commence a loop at %C");
+       gfc_error ("%<GCC vector%> directive not at the start of a loop at %C");
 
       if (directive_novector)
-       gfc_error ("%<GCC novector%> directive does not commence a loop at %C");
+       gfc_error ("%<GCC novector%> "
+                  "directive not at the start of a loop at %C");
 
       st = next_statement ();
     }
index a43cec3..faf5f15 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-05  Harald Anlauf  <anlauf@gmx.de>
+
+       PR fortran/91496
+       * gfortran.dg/directive_unroll_5.f90: Adjust error message.
+
 2019-09-05  Steven G. Kargl  <kargl@gcc.gnu.org>
 
        PR fortran/91660
index b88b4b2..33f2fda 100644 (file)
@@ -31,7 +31,7 @@ subroutine wrong3(a, b, n)
   integer :: a(n), b(n)
   integer (kind=4) :: i
 !GCC$ unroll 8
-  write (*,*) "wrong"! { dg-error "directive does not commence a loop" }
+  write (*,*) "wrong"! { dg-error "directive not at the start of a loop" }
   DO i=n, 1, -1
     call dummy2(a(i), b(i), i)
   ENDDO