forked from llvm/llvm-project
- Notifications
You must be signed in to change notification settings - Fork 339
/
Copy pathvla.c
24 lines (22 loc) · 553 Bytes
/
vla.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// This test case verifies the debug location for variable-length arrays.
// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
//
// DEBUGGER: break 18
// DEBUGGER: r
// DEBUGGER: p vla[0]
// CHECK: 23
// DEBUGGER: p vla[1]
// CHECK: 22
voidinit_vla(intsize) {
inti;
intvla[size];
for (i=0; i<size; i++)
vla[i] =size-i;
vla[0] =size; // line 18
}
intmain(intargc, constchar**argv) {
init_vla(23);
return0;
}