brintos

brintos / llvm-project-archived public Read only

0
0
Text · 645 B · 7d02b2d Raw
27 lines · c
1// REQUIRES: lldb2// UNSUPPORTED: system-windows3// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t4// RUN: %dexter --fail-lt 1.0 -w %dexter_lldb_args --binary %t -- %s5//6//// Check that the once-escaped variable 'param' can still be read after7//// we perform inlining + mem2reg. See D89810 and D85555.8 9int g;10__attribute__((__always_inline__))11static void use(int* p) {12  g = *p;13}14 15__attribute__((__noinline__))16void fun(int param) {17  volatile int step1 = 0;  // DexLabel('s1')18  use(&param);19  volatile int step2 = 0;  // DexLabel('s2')20}21 22int main() {23  fun(5);24}25 26// DexExpectWatchValue('param', '5', from_line=ref('s1'), to_line=ref('s2'))27