Page MenuHomePhabricator

[OpenMP] Allow reduction on pointer dereference

Authored by Hahnfeld on Mar 18 2016, 1:04 PM.



Pointer dereference is equal to access of first array element which is already allowed for the reduction clause.

While at it also add test for CodeGen of reduction on array element which seemed to be missing.

Diff Detail

Event Timeline

Hahnfeld updated this revision to Diff 51062.Mar 18 2016, 1:04 PM
Hahnfeld retitled this revision from to [OpenMP] Allow reduction on pointer dereference.
Hahnfeld updated this object.
Hahnfeld added a subscriber: cfe-commits.
ABataev added inline comments.Mar 20 2016, 9:10 PM

This is not allowed by OpenMP standard. I added support for array subscripts because they are very similar to array sections, but unary operations are definitely not allowed

Hahnfeld abandoned this revision.Mar 21 2016, 12:44 AM
Hahnfeld added inline comments.

Ok, I'm fine with that and will close this revision.

(for me *arr is the same as arr[0] so I expected it to work as well)