2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: ATOMIC_OR, Atomic subroutine, OR
10 ATOMIC_OR --- Atomic bitwise OR operation
11 *****************************************
13 .. function:: ATOMIC_OR(ATOM, VALUE)
15 ``ATOMIC_OR(ATOM, VALUE)`` atomically defines :samp:`{ATOM}` with the bitwise
16 AND between the values of :samp:`{ATOM}` and :samp:`{VALUE}`. When :samp:`{STAT}` is present
17 and the invocation was successful, it is assigned the value 0. If it is present
18 and the invocation has failed, it is assigned a positive value; in particular,
19 for a coindexed :samp:`{ATOM}`, if the remote image has stopped, it is assigned the
20 value of ``ISO_FORTRAN_ENV`` 's ``STAT_STOPPED_IMAGE`` and if the remote
21 image has failed, the value ``STAT_FAILED_IMAGE``.
24 Scalar coarray or coindexed variable of integer
25 type with ``ATOMIC_INT_KIND`` kind.
28 Scalar of the same type as :samp:`{ATOM}`. If the kind
29 is different, the value is converted to the kind of :samp:`{ATOM}`.
32 (optional) Scalar default-kind integer variable.
41 .. code-block:: fortran
43 CALL ATOMIC_OR (ATOM, VALUE [, STAT])
46 .. code-block:: fortran
50 integer(atomic_int_kind) :: atom[*]
51 call atomic_or (atom[1], int(b'10100011101'))
56 :ref:`ATOMIC_FETCH_OR`,
57 :ref:`ISO_FORTRAN_ENV`,