public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] OpenACC diagnostic typo fixes (PR fortran/80010)
@ 2017-03-19 11:30 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2017-03-19 11:30 UTC (permalink / raw)
  To: gcc-patches, fortran

Hi!

I've committed the following patch to fix various OpenACC diagnostic typos.

2017-03-16  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/80010
	* parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
	and ST_OACC_END_ATOMIC, instead of !ACC.
	* trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
	* openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
	gfc_resolve_oacc_declare): Likewise.

	* gfortran.dg/goacc/asyncwait-3.f95: Adjust expected diagnostic.

--- gcc/fortran/trans-decl.c	(revision 246203)
+++ gcc/fortran/trans-decl.c	(revision 246204)
@@ -6133,7 +6133,7 @@ finish_oacc_declare (gfc_namespace *ns,
 	continue;
 
       if (block)
-	gfc_error ("Sorry, $!ACC DECLARE at %L is not allowed "
+	gfc_error ("Sorry, !$ACC DECLARE at %L is not allowed "
 		   "in BLOCK construct", &oc->loc);
 
 
--- gcc/fortran/parse.c	(revision 246203)
+++ gcc/fortran/parse.c	(revision 246204)
@@ -2128,10 +2128,10 @@ gfc_ascii_statement (gfc_statement st)
       p = "!$ACC ROUTINE";
       break;
     case ST_OACC_ATOMIC:
-      p = "!ACC ATOMIC";
+      p = "!$ACC ATOMIC";
       break;
     case ST_OACC_END_ATOMIC:
-      p = "!ACC END ATOMIC";
+      p = "!$ACC END ATOMIC";
       break;
     case ST_OMP_ATOMIC:
       p = "!$OMP ATOMIC";
--- gcc/fortran/openmp.c	(revision 246203)
+++ gcc/fortran/openmp.c	(revision 246204)
@@ -2059,7 +2059,7 @@ gfc_match_oacc_declare (void)
 	  if (n->u.map_op != OMP_MAP_FORCE_ALLOC
 	      && n->u.map_op != OMP_MAP_FORCE_TO)
 	    {
-	      gfc_error ("Invalid clause in module with $!ACC DECLARE at %L",
+	      gfc_error ("Invalid clause in module with !$ACC DECLARE at %L",
 			 &where);
 	      return MATCH_ERROR;
 	    }
@@ -2069,7 +2069,7 @@ gfc_match_oacc_declare (void)
 
       if (s->attr.use_assoc)
 	{
-	  gfc_error ("Variable is USE-associated with $!ACC DECLARE at %L",
+	  gfc_error ("Variable is USE-associated with !$ACC DECLARE at %L",
 		     &where);
 	  return MATCH_ERROR;
 	}
@@ -2077,7 +2077,7 @@ gfc_match_oacc_declare (void)
       if ((s->attr.dimension || s->attr.codimension)
 	  && s->attr.dummy && s->as->type != AS_EXPLICIT)
 	{
-	  gfc_error ("Assumed-size dummy array with $!ACC DECLARE at %L",
+	  gfc_error ("Assumed-size dummy array with !$ACC DECLARE at %L",
 		     &where);
 	  return MATCH_ERROR;
 	}
@@ -2172,7 +2172,7 @@ gfc_match_oacc_wait (void)
       {
 	if (el->expr == NULL)
 	  {
-	    gfc_error ("Invalid argument to $!ACC WAIT at %L",
+	    gfc_error ("Invalid argument to !$ACC WAIT at %L",
 		       &wait_list->expr->where);
 	    return MATCH_ERROR;
 	  }
@@ -5985,7 +5985,7 @@ gfc_resolve_oacc_declare (gfc_namespace
 	    if (n->expr && n->expr->ref->type == REF_ARRAY)
 	      {
 		gfc_error ("Array sections: %qs not allowed in"
-			   " $!ACC DECLARE at %L", n->sym->name, &oc->loc);
+			   " !$ACC DECLARE at %L", n->sym->name, &oc->loc);
 		continue;
 	      }
 	  }
--- gcc/testsuite/gfortran.dg/goacc/asyncwait-3.f95	(revision 246203)
+++ gcc/testsuite/gfortran.dg/goacc/asyncwait-3.f95	(revision 246204)
@@ -23,7 +23,7 @@ program asyncwait
 
   !$acc wait (1 ! { dg-error "Syntax error in OpenACC expression list at" }
 
-  !$acc wait (1, *) ! { dg-error "Invalid argument to \\\$\\\!ACC WAIT" }
+  !$acc wait (1, *) ! { dg-error "Invalid argument to \\\!\\\$ACC WAIT" }
 
   !$acc wait (1, a) ! { dg-error "WAIT clause at \\\(1\\\) requires a scalar INTEGER expression" }
 

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-19 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-19 11:30 [committed] OpenACC diagnostic typo fixes (PR fortran/80010) Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).