[PATCH] D71225: [OpenMP][WIP] atomic update only evaluate once for expression having side effect

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 9 14:19:17 PST 2019


jdoerfert added a comment.

> • For forms that allow multiple occurrences of x, the number of times that x is evaluated is unspecified.

x here is `iarr[foo(), foo(), 0]`, if I'm not mistaken. Assuming not, any multiple of 2 is a fine amount of evaluations for `foo`.

I'd vote for a warning here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71225





More information about the cfe-commits mailing list