http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59488
Bug ID: 59488 Summary: l[OpenMP] named constant in parallel construct lead to "not specified in enclosing parallel" error. Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kargl at gcc dot gnu.org I'm not sure if this is a valid error or not. I saw the issue raised in comp.lang.fortran. https://groups.google.com/forum/#!topic/comp.lang.fortran/VKhoAm8m9KE with all versions of gfortran, one gets gfc47 -o c -fopenmp foo.f90 foo.f90: In function 'foo': foo.f90:17:0: error: 'nlcdtypes' not specified in enclosing parallel foo.f90:14:0: error: enclosing parallel for program foo implicit none integer, parameter :: ncols = 100, nrows = 200, nnlcd = 2 integer, parameter :: nlcdtypes(nnlcd) = (/ 11, 12 /) integer :: ibuf(ncols,nrows), icnt(ncols,nrows), c, r, k integer, external :: find1 icnt = 0 ibuf = 17 !$omp parallel do & !$omp default( none ), & !$omp& shared( icnt, ibuf ), & !$omp& private( r, c, k ) do r = 1, nrows do c = 1, ncols k = find1(ibuf(c,r), nnlcd, nlcdtypes) end do end do end program foo This may be related to pr 36556. If I remove the default(none) clause, the code compiles.