[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / cross-project-tests / debuginfo-tests / dexter-tests / memvars / ptr-to.c
blob4f0a9af053fbc823033b7e9d5c3e9fa90583a6a4
1 // XFAIL:*
2 //// Currently debug info for 'local' behaves, but 'plocal' dereferences to
3 //// the incorrect value 0xFF after the call to esc.
5 // REQUIRES: lldb
6 // UNSUPPORTED: system-windows
7 // RUN: %dexter --fail-lt 1.0 -w --debugger lldb \
8 // RUN: --builder clang-c --cflags "-O2 -glldb" -- %s
9 //
10 //// Check that a pointer to a variable living on the stack dereferences to the
11 //// variable value.
13 int glob;
14 __attribute__((__noinline__))
15 void esc(int* p) {
16 glob = *p;
17 *p = 0xFF;
20 int main() {
21 int local = 0xA;
22 int *plocal = &local;
23 esc(plocal); // DexLabel('s1')
24 local = 0xB; //// DSE
25 return 0; // DexLabel('s2')
29 // DexExpectWatchValue('local', 0xA, on_line=ref('s1'))
30 // DexExpectWatchValue('local', 0xB, on_line=ref('s2'))
31 // DexExpectWatchValue('*plocal', 0xA, on_line=ref('s1'))
32 // DexExpectWatchValue('*plocal', 0xB, on_line=ref('s2'))
33 //// Ideally we should be able to observe the dead store to local (0xB) through
34 //// plocal here.
35 // DexExpectWatchValue('(local == *plocal)', 'true', from_line=ref('s1'), to_line=ref('s2'))