2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
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 07022efa1ba4a58fa12c3f8a3b911fba32a5df1b Mon Sep 17 00:00:00 2001
From: Cesar Philippidis <cesar@codesourcery.com>
Date: Mon, 11 Jun 2018 14:03:47 -0700
Subject: [PATCH] fix PR85702
---
gcc/fortran/openmp.c | 3 +--
gcc/testsuite/gfortran.dg/goacc/pr85702.f90 | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/gfortran.dg/goacc/pr85702.f90
@@ -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;
}
new file mode 100644
@@ -0,0 +1,6 @@
+! PR fortran/85702
+! { dg-do compile }
+
+subroutine s
+ !$acc wait(*) ! { dg-error "Invalid argument to ..ACC WAIT" }
+end
--
2.7.4