[flang-commits] [PATCH] D131535: [flang] Add semantics test for atomic_add subroutine

Katherine Rasmussen via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Aug 16 14:57:49 PDT 2022


ktras requested changes to this revision.
ktras added a comment.
This revision now requires changes to proceed.

The test looks great, please see the couple of suggestions in the in line comments.



================
Comment at: flang/test/Semantics/atomic01.f90:11
+  integer(kind=atomic_int_kind) atom_object[*], atom_array(2)[*], quantity, array(1), coarray[*], non_coarray
+  integer non_atom_object[*], non_atom, non_scalar(1), sync_status, stat_array(1), coindexed[*]
+  logical non_integer
----------------
I recommend renaming `sync_status` to `status` or something like that, since this program tests an atomic subroutine, not a synchronization statement, so the variable name might be a bit misleading.


================
Comment at: flang/test/Semantics/atomic01.f90:43
+  ! atom must not be coindexed
+  call atomic_add(atom_object[1], quantity)
+
----------------
This is a duplicate of the call on `line 17`. Since `atom` may be a coindexed object, this call plus the comment above should be removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131535/new/

https://reviews.llvm.org/D131535



More information about the flang-commits mailing list