aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/uninit-variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/uninit-variables.c')
-rw-r--r--test/Sema/uninit-variables.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/uninit-variables.c b/test/Sema/uninit-variables.c
index bcffbd6a3d..f716124bcb 100644
--- a/test/Sema/uninit-variables.c
+++ b/test/Sema/uninit-variables.c
@@ -404,4 +404,10 @@ void PR11069(int a, int b) {
}
}
+// Test uninitialized value used in loop condition.
+void rdar9432305(float *P) {
+ int i; // expected-note {{initialize the variable 'i' to silence this warning}}
+ for (; i < 10000; ++i) // expected-warning {{variable 'i' is uninitialized when used here}}
+ P[i] = 0.0f;
+}