diff --git gcc/c/c-parser.c gcc/c/c-parser.c
index ce46f31..e73379e 100644
--- gcc/c/c-parser.c
+++ gcc/c/c-parser.c
@@ -11007,6 +11007,7 @@ c_parser_omp_structured_block (c_parser *parser)
 
 /* OpenACC 2.0:
    # pragma acc parallel oacc-parallel-clause[optseq] new-line
+     structured-block
 
    LOC is the location of the #pragma token.
 */
diff --git gcc/gimplify.c gcc/gimplify.c
index e45bed2..db0dafe 100644
--- gcc/gimplify.c
+++ gcc/gimplify.c
@@ -1479,9 +1479,10 @@ gimplify_case_label_expr (tree *expr_p, gimple_seq *pre_p)
   struct gimplify_ctx *ctxp;
   gimple gimple_label;
 
-  /* Invalid OpenMP programs can play Duff's Device type games with
+  /* Invalid programs can play Duff's Device type games with, for example,
      #pragma omp parallel.  At least in the C front end, we don't
-     detect such invalid branches until after gimplification.  */
+     detect such invalid branches until after gimplification, in the
+     diagnose_omp_blocks pass.  */
   for (ctxp = gimplify_ctxp; ; ctxp = ctxp->prev_context)
     if (ctxp->case_labels.exists ())
       break;
diff --git gcc/omp-low.c gcc/omp-low.c
index f55a1ea..e636545 100644
--- gcc/omp-low.c
+++ gcc/omp-low.c
@@ -10806,7 +10806,7 @@ make_pass_lower_omp (gcc::context *ctxt)
   return new pass_lower_omp (ctxt);
 }
 
-/* The following is a utility to diagnose OpenMP structured block violations.
+/* The following is a utility to diagnose structured block violations.
    It is not part of the "omplower" pass, as that's invoked too late.  It
    should be invoked by the respective front ends after gimplification.  */
 
@@ -10834,6 +10834,15 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
 	      && gimple_omp_for_kind (label_ctx) == GF_OMP_FOR_KIND_CILKSIMD))
 	kind = "Cilk Plus";
     }
+  if (flag_openacc)
+    {
+      if ((branch_ctx && gimple_code (branch_ctx) == GIMPLE_OACC_PARALLEL)
+	  || (label_ctx && gimple_code (label_ctx) == GIMPLE_OACC_PARALLEL))
+	{
+	  gcc_assert (kind == NULL);
+	  kind = "OpenACC";
+	}
+    }
   if (kind == NULL)
     {
       gcc_assert (flag_openmp);
@@ -10889,7 +10898,7 @@ diagnose_sb_0 (gimple_stmt_iterator *gsi_p,
   return true;
 }
 
-/* Pass 1: Create a minimal tree of OpenMP structured blocks, and record
+/* Pass 1: Create a minimal tree of structured blocks, and record
    where each label is found.  */
 
 static tree
@@ -10902,10 +10911,11 @@ diagnose_sb_1 (gimple_stmt_iterator *gsi_p, bool *handled_ops_p,
 
   *handled_ops_p = true;
 
- switch (gimple_code (stmt))
+  switch (gimple_code (stmt))
     {
     WALK_SUBSTMTS;
 
+    case GIMPLE_OACC_PARALLEL:
     case GIMPLE_OMP_PARALLEL:
     case GIMPLE_OMP_TASK:
     case GIMPLE_OMP_SECTIONS:
@@ -10917,7 +10927,7 @@ diagnose_sb_1 (gimple_stmt_iterator *gsi_p, bool *handled_ops_p,
     case GIMPLE_OMP_TARGET:
     case GIMPLE_OMP_TEAMS:
     case GIMPLE_OMP_TASKGROUP:
-      /* The minimal context here is just the current OMP construct.  */
+      /* The minimal context here is just the current construct.  */
       inner_context = stmt;
       wi->info = inner_context;
       walk_gimple_seq (gimple_omp_body (stmt), diagnose_sb_1, NULL, wi);
@@ -10964,6 +10974,7 @@ diagnose_sb_2 (gimple_stmt_iterator *gsi_p, bool *handled_ops_p,
     {
     WALK_SUBSTMTS;
 
+    case GIMPLE_OACC_PARALLEL:
     case GIMPLE_OMP_PARALLEL:
     case GIMPLE_OMP_TASK:
     case GIMPLE_OMP_SECTIONS:
@@ -11046,8 +11057,8 @@ diagnose_sb_2 (gimple_stmt_iterator *gsi_p, bool *handled_ops_p,
   return NULL_TREE;
 }
 
-/* Called from tree-cfg.c::make_edges to create cfg edges for all GIMPLE_OMP
-   codes.  */
+/* Called from tree-cfg.c::make_edges to create cfg edges for all relevant
+   GIMPLE codes.  */
 bool
 make_gimple_omp_edges (basic_block bb, struct omp_region **region)
 {
diff --git gcc/testsuite/gcc.dg/goacc/parallel-sb-1.c gcc/testsuite/gcc.dg/goacc/parallel-sb-1.c
new file mode 100644
index 0000000..3909916
--- /dev/null
+++ gcc/testsuite/gcc.dg/goacc/parallel-sb-1.c
@@ -0,0 +1,22 @@
+// { dg-do compile }
+
+void foo()
+{
+  bad1:
+  #pragma acc parallel
+    goto bad1; // { dg-error "invalid branch to/from OpenACC structured block" }
+
+  goto bad2; // { dg-error "invalid entry to OpenACC structured block" }
+  #pragma acc parallel
+    {
+      bad2: ;
+    }
+
+  #pragma acc parallel
+    {
+      int i;
+      goto ok1;
+      for (i = 0; i < 10; ++i)
+	{ ok1: break; }
+    }
+}
diff --git gcc/testsuite/gcc.dg/goacc/parallel-sb-2.c gcc/testsuite/gcc.dg/goacc/parallel-sb-2.c
new file mode 100644
index 0000000..aede042
--- /dev/null
+++ gcc/testsuite/gcc.dg/goacc/parallel-sb-2.c
@@ -0,0 +1,10 @@
+// { dg-do compile }
+
+void foo(int i)
+{
+  switch (i) // { dg-error "invalid entry to OpenACC structured block" }
+  {
+  #pragma acc parallel
+    { case 0:; }
+  }
+}
