Skip to content

[flang][openmp] Incorrect diagnostic on Openmp Atomic update statement #138748

Open
@DanielCChen

Description

@DanielCChen

Consider the following test case

    integer (kind = 4) :: a
    integer :: c
    a = 1
    c = 3
    d = 4
!$omp atomic
    a = a + c + d
end

Flang now issues an error

./t.f:7:5: error: Atomic update statement should be of form `a = a operator expr` OR `a = expr operator a`
      a = a + c + d
      ^

The code is conforming to the standard.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions