+2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
+
+ * openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
+ before vector.
+
2016-07-15 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/71807
continue;
break;
case 'v':
+ /* VECTOR_LENGTH must be matched before VECTOR, because the latter
+ doesn't unconditionally match '('. */
+ if ((mask & OMP_CLAUSE_VECTOR_LENGTH)
+ && c->vector_length_expr == NULL
+ && (gfc_match ("vector_length ( %e )", &c->vector_length_expr)
+ == MATCH_YES))
+ continue;
if ((mask & OMP_CLAUSE_VECTOR)
&& !c->vector
&& gfc_match ("vector") == MATCH_YES)
needs_space = true;
continue;
}
- if ((mask & OMP_CLAUSE_VECTOR_LENGTH)
- && c->vector_length_expr == NULL
- && (gfc_match ("vector_length ( %e )", &c->vector_length_expr)
- == MATCH_YES))
- continue;
break;
case 'w':
if ((mask & OMP_CLAUSE_WAIT)
+2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
+
+ * gfortran.dg/goacc/vector_length.f90: New test.
+
2016-07-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/71881
--- /dev/null
+program t
+ implicit none
+ integer, parameter :: n = 100
+ integer a(n), i
+
+ !$acc parallel loop num_gangs(100) num_workers(1) vector_length(32)
+ do i = 1, n
+ a(i) = i
+ enddo
+ !$acc end parallel loop
+end program t