[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / cross-project-tests / debuginfo-tests / dexter-tests / asan-deque.cpp
blob60f505ae582bff66262d0f52ac492b7c3b6c6ccc
1 // REQUIRES: !asan, compiler-rt, lldb
2 // UNSUPPORTED: system-windows
3 // Zorg configures the ASAN stage2 bots to not build the asan
4 // compiler-rt. Only run this test on non-asanified configurations.
5 // UNSUPPORTED: apple-lldb-pre-1000
7 // XFAIL: lldb
8 // lldb-8, even outside of dexter, will sometimes trigger an asan fault in
9 // the debugged process and generally freak out.
11 // RUN: %dexter --fail-lt 1.0 -w \
12 // RUN: --builder 'clang' --debugger 'lldb' \
13 // RUN: --cflags "-O1 -glldb -fsanitize=address -arch x86_64" \
14 // RUN: --ldflags="-fsanitize=address" -- %s
15 #include <deque>
17 struct A {
18 int a;
19 A(int a) : a(a) {}
20 A() : a(0) {}
23 using deq_t = std::deque<A>;
25 template class std::deque<A>;
27 static void __attribute__((noinline, optnone)) escape(deq_t &deq) {
28 static volatile deq_t *sink;
29 sink = &deq;
32 int main() {
33 deq_t deq;
34 deq.push_back(1234);
35 deq.push_back(56789);
36 escape(deq); // DexLabel('first')
37 while (!deq.empty()) {
38 auto record = deq.front();
39 deq.pop_front();
40 escape(deq); // DexLabel('second')
44 // DexExpectWatchValue('deq[0].a', '1234', on_line=ref('first'))
45 // DexExpectWatchValue('deq[1].a', '56789', on_line=ref('first'))
47 // DexExpectWatchValue('deq[0].a', '56789', '0', on_line=ref('second'))