32 lines · c
1// RUN: %clang -fblocks %target_itanium_abi_host_triple -arch x86_64 %s -o %t.out -g -fsanitize=address2// RUN: %test_debuginfo %s %t.out3// REQUIRES: !asan, compiler-rt4// Zorg configures the ASAN stage2 bots to not build the asan5// compiler-rt. Only run this test on non-asanified configurations.6// XFAIL: !system-darwin && gdb-clang-incompatibility7 8struct S {9 int a[8];10};11 12int f(struct S s, unsigned i) {13 // DEBUGGER: break 1414 return s.a[i];15}16 17int main(int argc, const char **argv) {18 struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};19 if (f(s, 4) == 4)20 return f(s, 0);21 return 0;22}23 24// DEBUGGER: r25// DEBUGGER: p s26// CHECK: a =27// DEBUGGER: p s.a[0]28// CHECK: = 029// DEBUGGER: p s.a[1]30// CHECK: = 131// DEBUGGER: p s.a[7]32