return code->op == EXEC_OACC_KERNELS || code->op == EXEC_OACC_KERNELS_LOOP;
}
+static bool
+oacc_is_serial (gfc_code *code)
+{
+ return code->op == EXEC_OACC_SERIAL || code->op == EXEC_OACC_SERIAL_LOOP;
+}
+
+static bool
+oacc_is_parallel_or_serial (gfc_code *code)
+{
+ return oacc_is_parallel (code) || oacc_is_serial (code);
+}
+
static gfc_statement
omp_code_to_statement (gfc_code *code)
{
for (c = omp_current_ctx; c; c = c->previous)
if (!oacc_is_loop (c->code))
break;
- if (c == NULL || !(oacc_is_parallel (c->code)
+ if (c == NULL || !(oacc_is_parallel_or_serial (c->code)
|| oacc_is_kernels (c->code)))
gfc_error ("gang reduction on an orphan loop at %L", &code->loc);
}
! { dg-additional-sources parallel-dims-aux.c }
! { dg-do run }
- ! { dg-skip-if TODO { *-*-* } }
! { dg-prune-output "command-line option '-fintrinsic-modules-path=.*' is valid for Fortran but not for C" }
! { dg-additional-options "-fopt-info-note-omp" }