summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/for_codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/OpenMP/for_codegen.cpp')
-rw-r--r--test/OpenMP/for_codegen.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/OpenMP/for_codegen.cpp b/test/OpenMP/for_codegen.cpp
index b27bd7b1db..7d823ed205 100644
--- a/test/OpenMP/for_codegen.cpp
+++ b/test/OpenMP/for_codegen.cpp
@@ -484,6 +484,18 @@ void loop_with_It(It<char> begin, It<char> end) {
// CHECK: call void @__kmpc_for_static_init_8(
// CHECK: call void @__kmpc_for_static_fini(
+void loop_with_It_plus(It<char> begin, It<char> end) {
+#pragma omp for
+ for (It<char> it = begin; it < end; it+=1) {
+ *it = 0;
+ }
+}
+
+// CHECK-LABEL: loop_with_It_plus
+// CHECK: call i32 @__kmpc_global_thread_num(
+// CHECK: call void @__kmpc_for_static_init_8(
+// CHECK: call void @__kmpc_for_static_fini(
+
void loop_with_stmt_expr() {
#pragma omp for
for (int i = __extension__({float b = 0;b; }); i < __extension__({double c = 1;c; }); i += __extension__({char d = 1; d; }))