summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/captured-statements.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/captured-statements.c')
-rw-r--r--clang/test/CodeGen/captured-statements.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/CodeGen/captured-statements.c b/clang/test/CodeGen/captured-statements.c
index b52d115ef04..4ff87910c22 100644
--- a/clang/test/CodeGen/captured-statements.c
+++ b/clang/test/CodeGen/captured-statements.c
@@ -48,11 +48,12 @@ void test2(int x) {
// CHECK-2: %i = alloca i32
// Capture array
-void test3() {
+void test3(int size) {
int arr[] = {1, 2, 3, 4, 5};
+ int vla_arr[size];
#pragma clang __debug captured
{
- arr[2] = arr[1];
+ arr[2] = vla_arr[size - 1];
}
// CHECK-3: test3
// CHECK-3: alloca [5 x i32]
OpenPOWER on IntegriCloud