+2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gimplify.c (omp_notice_variable) <case OMP_CLAUSE_DEFAULT_NONE>:
+ Explicitly enumerate the expected region types.
+
2014-05-23 Paul Eggert <eggert@cs.ucla.edu>
PR other/56955
switch (default_kind)
{
case OMP_CLAUSE_DEFAULT_NONE:
- if ((ctx->region_type & ORT_TASK) != 0)
+ if (ctx->region_type == ORT_PARALLEL
+ || ctx->region_type == ORT_COMBINED_PARALLEL)
+ {
+ error ("%qE not specified in enclosing parallel",
+ DECL_NAME (lang_hooks.decls.omp_report_decl (decl)));
+ error_at (ctx->location, "enclosing parallel");
+ }
+ else if ((ctx->region_type & ORT_TASK) != 0)
{
error ("%qE not specified in enclosing task",
DECL_NAME (lang_hooks.decls.omp_report_decl (decl)));
error_at (ctx->location, "enclosing teams construct");
}
else
- {
- error ("%qE not specified in enclosing parallel",
- DECL_NAME (lang_hooks.decls.omp_report_decl (decl)));
- error_at (ctx->location, "enclosing parallel");
- }
+ gcc_unreachable ();
/* FALLTHRU */
case OMP_CLAUSE_DEFAULT_SHARED:
flags |= GOVD_SHARED;