http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59337

            Bug ID: 59337
           Summary: surprising OMP error message
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch
                CC: jakub at gcc dot gnu.org

> cat test.f90 
!$OMP ATOMIC
i=-i
END

> gfortran -fopenmp test.f90 
test.f90:2.2:

i=-i
  1
Error: !$OMP ATOMIC assignment operator must be +, *, -, /, .AND., .OR., .EQV.
or .NEQV. at (1)


The caret is pointing at a '-', and the error message is saying it must be one.
It appear that the proper way to write this is 

!$OMP ATOMIC
i=0-i
END

but that is not so obvious from the error messsage. Maybe it could be worded as
'... must be one of the binary operators '

Reply via email to