brintos

brintos / llvm-project-archived public Read only

0
0
Text · 588 B · 6978b5b Raw
24 lines · c
1// This test case verifies the debug location for variable-length arrays.2// REQUIRES: lldb3// UNSUPPORTED: system-windows4//5// RUN: %clang -std=gnu11 -O0 -glldb %s -o %t6// RUN: %dexter --fail-lt 1.0 -w --binary %t %dexter_lldb_args -- %s7 8void 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')14}15 16int main(int argc, const char **argv) {17  init_vla(23);18  return 0;19}20 21// DexExpectWatchValue('vla[0]', '23', on_line=ref('end_init'))22// DexExpectWatchValue('vla[1]', '22', on_line=ref('end_init'))23 24