2 // Incorrect location for variable "parama", see PR48719.
5 // UNSUPPORTED: system-windows
6 // RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
7 // RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
9 // 1. parama is escaped by esc(¶ma) so it is not promoted by
11 // 2. InstCombine's LowerDbgDeclare converts the dbg.declare to a set of
12 // dbg.values (tracking the stored SSA values).
13 // 3. InstCombine replaces the two stores to parama's alloca (the initial
14 // parameter register store in entry and the assignment in if.then) with a
15 // PHI+store in the common sucessor.
16 // 4. SimplifyCFG folds the blocks together and converts the PHI to a
19 // The debug info is not updated to account for the merged value in the
20 // sucessor prior to SimplifyCFG when it exists as a PHI, or during when it
21 // becomes a select. As a result we see parama=5 for the entire function, when
22 // we'd expect to see param=20 when stepping onto fluff().
24 __attribute__((optnone
))
27 __attribute__((optnone
))
30 __attribute__((noinline
))
31 int fun(int parama
, int paramb
) {
34 fluff(); // DexLabel('s0')
43 // DexExpectWatchValue('parama', 20, on_line=ref('s0'))