diff mbox

Fix openacc test

Message ID 5645EA56.3030104@acm.org
State New
Headers show

Commit Message

Nathan Sidwell Nov. 13, 2015, 1:49 p.m. UTC
I've committed this patch to fixup an  erroneously failing test.  I'd changed 
the diagnostic, but not the matching test.  While there, I noticed I should have 
been using 'inform' to emit a note, not another error.

nathan
diff mbox

Patch

2015-11-13  Nathan Sidwell  <nathan@codesourcery.com>

	gcc/
	* gimplify.c (oacc_default_clause): Use inform for enclosing scope.

	gcc/testsuite/
	* c-c++-common/goacc/data-default-1.c: Correct expected
	diagnostic.

Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c	(revision 230283)
+++ gcc/gimplify.c	(working copy)
@@ -6007,7 +6007,7 @@  oacc_default_clause (struct gimplify_omp
     {
       error ("%qE not specified in enclosing OpenACC %qs construct",
 	     DECL_NAME (lang_hooks.decls.omp_report_decl (decl)), rkind);
-      error_at (ctx->location, "enclosing OpenACC %qs construct", rkind);
+      inform (ctx->location, "enclosing OpenACC %qs construct", rkind);
     }
   else
     gcc_checking_assert (ctx->default_kind == OMP_CLAUSE_DEFAULT_SHARED);
Index: gcc/testsuite/c-c++-common/goacc/data-default-1.c
===================================================================
--- gcc/testsuite/c-c++-common/goacc/data-default-1.c	(revision 230283)
+++ gcc/testsuite/c-c++-common/goacc/data-default-1.c	(working copy)
@@ -6,13 +6,13 @@  int main ()
   int n = 2;
   int ary[2];
   
-#pragma acc parallel default (none) /* { dg-message "parallel construct" 2 } */
+#pragma acc parallel default (none) /* { dg-message "'parallel' construct" 2 } */
   {
     ary[0] /* { dg-error "not specified in enclosing" } */
       = n; /* { dg-error "not specified in enclosing" } */
   }
 
-#pragma acc kernels default (none) /* { dg-message "kernels construct" 2 } */
+#pragma acc kernels default (none) /* { dg-message "'kernels' construct" 2 } */
   {
     ary[0] /* { dg-error "not specified in enclosing" } */
       = n; /* { dg-error "not specified in enclosing" } */