[flang-commits] [flang] [flang][OpenACC] Add minus operator to reduction clause (PR #200909)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Jun 1 12:45:56 PDT 2026


================
@@ -13,6 +13,9 @@ program openacc_reduction_validity
   !$acc parallel reduction(+:i)
   !$acc end parallel
 
+  !$acc parallel reduction(-:i)
----------------
eugeneepshteyn wrote:

Oh, since there's a warning now, need to test for it. Will need to add something like this:
```
!WARNING: The minus '-' reduction operator is non-standard and is treated as '+' [-Wopenacc-usage]
```
@ronGreenNV , please run this LIT tests to see if it fails with the warning. May need to add the `!WARNING:` line everywhere with `-` reduction.

https://github.com/llvm/llvm-project/pull/200909


More information about the flang-commits mailing list