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
2015-11-13 Nathan Sidwell <nat...@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" } */