[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / cross-project-tests / debuginfo-tests / dexter-tests / vla.c
blobf0b400fe45506a5d31dd3fd987ff6612931c92b6
1 // This test case verifies the debug location for variable-length arrays.
2 // REQUIRES: lldb
3 // UNSUPPORTED: system-windows
4 //
5 // RUN: %dexter --fail-lt 1.0 -w \
6 // RUN: --builder clang-c --debugger 'lldb' --cflags "-O0 -glldb" -- %s
8 void init_vla(int size) {
9 int i;
10 int vla[size];
11 for (i = 0; i < size; i++)
12 vla[i] = size-i;
13 vla[0] = size; // DexLabel('end_init')
16 int main(int argc, const char **argv) {
17 init_vla(23);
18 return 0;
21 // DexExpectWatchValue('vla[0]', '23', on_line=ref('end_init'))
22 // DexExpectWatchValue('vla[1]', '22', on_line=ref('end_init'))