summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/declare_reduction_ast_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/declare_reduction_ast_print.c')
-rw-r--r--test/OpenMP/declare_reduction_ast_print.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/OpenMP/declare_reduction_ast_print.c b/test/OpenMP/declare_reduction_ast_print.c
index 239b1cfd44..37b722e5f8 100644
--- a/test/OpenMP/declare_reduction_ast_print.c
+++ b/test/OpenMP/declare_reduction_ast_print.c
@@ -43,4 +43,17 @@ int main() {
}
// CHECK: }
+#pragma omp declare reduction(mymin:int \
+ : omp_out = omp_out > omp_in ? omp_in : omp_out) \
+ initializer(omp_priv = 2147483647)
+
+int foo(int argc, char **argv) {
+ int x;
+#pragma omp parallel for reduction(mymin : x)
+ for (int i = 0; i < 1000; i++)
+ ;
+ return 0;
+}
+
+// CHECK: #pragma omp parallel for reduction(mymin: x)
#endif