Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

OpenMP syntax bug

fah10
New Contributor I
410 Views
The Intel Fortran compiler does not compile programs when variable names used within OpenMP copyprivate clauses start with 'do'
However, from the OpenMP standard, I see no reason why such variable names should be forbidden?!

Example:

program test

real :: dot

!$omp parallel private(dot)

!$omp single
dot = 1.0
!$omp end single copyprivate(dot)

!$omp end parallel

end program test

Compilation aborts with:

omp_copyprivate_syntax.F90(9): error #5082: Syntax error, found 'DO' when expecting one of: /
!$omp end single copyprivate(dot)
-----------------------------^
omp_copyprivate_syntax.F90(9): error #7982: Variables in the COPYPRIVATE list must be PRIVATE in the enclosing parallel region.
!$omp end single copyprivate(dot)
-------------------------------^


The trivial work-around is to rename the variable.
0 Kudos
1 Reply
Xiaoping_D_Intel
Employee
410 Views
Thanks for reporting the error. I have filed a bug report (Tracking ID: DPD200162297) and will keep you posted on its status.

Thanks,
Xiaoping Duan
Intel Customer Support
0 Kudos
Reply