re PR fortran/85702 ([openacc] ICE in gfc_format_decoder, at fortran/error.c:943)
authorCesar Philippidis <cesar@codesourcery.com>
Wed, 13 Jun 2018 14:29:04 +0000 (07:29 -0700)
committerCesar Philippidis <cesar@gcc.gnu.org>
Wed, 13 Jun 2018 14:29:04 +0000 (07:29 -0700)
PR fortran/85702

gcc/fortran/
* openmp.c (gfc_match_oacc_wait): Use %C to report error location.

gcc/testsuite/
* gfortran.dg/goacc/pr85702.f90: New test.

From-SVN: r261550

gcc/fortran/ChangeLog
gcc/fortran/openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/pr85702.f90 [new file with mode: 0644]

index 9768959374d745bf1b054935f2dca6afa8d43b53..9018933e6971f3672758f76b9411e24b4b09a5d9 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
+
+       PR fortran/85702
+       * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
+
 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
 
        PR other/69968
index 5c13312585ac5b1681ac7f1951abe6b063483c40..97d6e7823735e0d053d7bea07c268dd729e64947 100644 (file)
@@ -2177,8 +2177,7 @@ gfc_match_oacc_wait (void)
       {
        if (el->expr == NULL)
          {
-           gfc_error ("Invalid argument to !$ACC WAIT at %L",
-                      &wait_list->expr->where);
+           gfc_error ("Invalid argument to !$ACC WAIT at %C");
            return MATCH_ERROR;
          }
 
index 8d5d40598a4ba20cdcf3a2b7ab09c86ec2942471..13a18bac08ba8dbbdb874bacb545f5a560140458 100644 (file)
@@ -1,3 +1,8 @@
+2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
+
+       PR fortran/85702
+       * gfortran.dg/goacc/pr85702.f90: New test.
+
 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc.target/i386/pr86048.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/goacc/pr85702.f90 b/gcc/testsuite/gfortran.dg/goacc/pr85702.f90
new file mode 100644 (file)
index 0000000..7488618
--- /dev/null
@@ -0,0 +1,6 @@
+! PR fortran/85702
+! { dg-do compile }
+
+subroutine s
+  !$acc wait(*) ! { dg-error "Invalid argument to ..ACC WAIT" }
+end