[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / cross-project-tests / debuginfo-tests / llgdb-tests / safestack.c
blobb2feab56de81d9d387bc81dcf8e4260389cb63f9
1 // 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 // UNSUPPORTED: system-darwin
4 // REQUIRES: !asan, compiler-rt
5 // Zorg configures the ASAN stage2 bots to not build the
6 // safestack compiler-rt. Only run this test on
7 // non-asanified configurations.
8 // XFAIL: !system-darwin && gdb-clang-incompatibility
9 struct S {
10 int a[8];
13 int f(struct S s, unsigned i);
15 int main(int argc, const char **argv) {
16 struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
17 // DEBUGGER: break 17
18 f(s, 4);
19 // DEBUGGER: break 19
20 return 0;
23 int f(struct S s, unsigned i) {
24 // DEBUGGER: break 24
25 return s.a[i];
28 // DEBUGGER: r
29 // DEBUGGER: p s
30 // CHECK: a =
31 // DEBUGGER: p s.a[0]
32 // CHECK: = 0
33 // DEBUGGER: p s.a[1]
34 // CHECK: = 1
35 // DEBUGGER: p s.a[7]
36 // CHECK: = 7
37 // DEBUGGER: c
38 // DEBUGGER: p s
39 // CHECK: a =
40 // DEBUGGER: p s.a[0]
41 // CHECK: = 0
42 // DEBUGGER: p s.a[1]
43 // CHECK: = 1
44 // DEBUGGER: p s.a[7]
45 // DEBUGGER: c
46 // DEBUGGER: p s
47 // CHECK: a =
48 // DEBUGGER: p s.a[0]
49 // CHECK: = 0
50 // DEBUGGER: p s.a[1]
51 // CHECK: = 1
52 // DEBUGGER: p s.a[7]