blob: c8c7109e6687b3fa37aec07d6999cc80eedf056f [file] [log] [blame]
Adrian Prantl7b2bf892017-04-17 17:57:03 +00001// RUN: %clang %target_itanium_abi_host_triple -arch x86_64 %s -o %t.out -g -fsanitize=safe-stack
2// RUN: %test_debuginfo %s %t.out
3// REQUIRES: not_asan
4// Zorg configures the ASAN stage2 bots to not build the
5// safestack compiler-rt. Only run this test on
6// non-asanified configurations.
7//
8// DEBUGGER: break 19
9// DEBUGGER: r
10// DEBUGGER: p s
11//
12// CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)
13
14struct S {
15 int a[8];
16};
17
18int f(struct S s, unsigned i) {
19 return s.a[i];
20}
21
22int main(int argc, const char **argv) {
23 struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
24 return f(s, 4);
25}