5 // UNSUPPORTED: system-windows
6 // RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
7 // RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
9 //// Check that once-escaped variable 'param' can still be read after we
10 //// perform inlining + mem2reg, and that we see the DSE'd value 255.
14 __attribute__((__always_inline__
))
15 static void use(int* p
) {
18 volatile int step
= 0; // DexLabel('use1')
21 __attribute__((__noinline__
))
23 //// Make sure first step is in 'fun'.
24 volatile int step
= 0; // DexLabel('fun1')
26 return; // DexLabel('fun2')
34 # Expect param == 5 before stepping through inlined 'use'.
35 DexExpectWatchValue('param', '5', on_line=ref('fun1'))
37 # Expect param == 255 after assignment in inlined frame 'use'.
38 DexExpectProgramState({
41 'location': { 'lineno': ref('use1') },
44 'location': { 'lineno': 20 },
45 'watches': { 'param': '255' }
50 # Expect param == 255 after inlined call to 'use'.
51 DexExpectWatchValue('param', '255', on_line=ref('fun2'))