http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50688
Bug #: 50688 Summary: OpenMP: Strange interaction with BLOCK Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: tkoe...@gcc.gnu.org Weird... omp workshare doesn't recognize BLOCK? program workshare implicit none integer :: i real :: A(5), B(5) B(1) = 3.344 A = [real :: 1, 2, 3, 4, 5 ] !$omp parallel default(shared) !$omp workshare block real :: b1 b1 = cos(b(1)) A(:) = A(:)*cos(B1)+A(:)*cos(B1) end block !$omp end workshare nowait !$omp end parallel ! sync is implied here print *, A end program workshare ig25@linux-fd1f:~/Krempel/OMP> gfortran workshare.f90 ig25@linux-fd1f:~/Krempel/OMP> gfortran -fopenmp workshare.f90 workshare.f90:9.7: block 1 Error: Unexpected BLOCK statement at (1) workshare.f90:10.14: real :: b1 1 Error: Unexpected data declaration statement at (1) workshare.f90:13.5: end block 1 Error: Unexpected END statement at (1) workshare.f90:11.6: b1 = cos(b(1)) 1 Error: Symbol 'b1' at (1) has no IMPLICIT type g25@linux-fd1f:~/Krempel/OMP> gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/home/ig25/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../trunk/configure --prefix=/home/ig25 --enable-languages=c,fortran --with-mpc=/usr/local --with-mpfr=/usr/local Thread model: posix gcc version 4.7.0 20111008 (experimental) (GCC)