This patch is for pointing out that we might need to check if the
expression in atomic update having any side effect. In the past we
always only evaluate an expression once, for example:
int cnt = 0; int foo() { return ++cnt; } void bar() { int iarr[100]; #pragma omp atomic capture iarr[foo(), foo(), 0] = iarr[foo(), foo(), 0] + 1; }
For now, the result of cnt is 2, however, we probably want cnt to be 4
or we might want to tell user that we only evaluate the expression once
as diagnosis message.
Actually, atomic capture have the exact same issue, but the purpose of
this patch to expose the issue. After the discussion, I might send another
patch to fix the issue.