[RISCV] Remove old FIXMEs from test. NFC
[llvm-project.git] / cross-project-tests / debuginfo-tests / dexter-tests / memvars / inlining-dse.c
blobd5bdc3e01fa17037485d758efaebbcfaf72138ef
1 // XFAIL:*
2 //// See PR47946.
4 // REQUIRES: lldb
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
8 //
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.
13 int g;
14 __attribute__((__always_inline__))
15 static void use(int* p) {
16 g = *p;
17 *p = 255;
18 volatile int step = 0; // DexLabel('use1')
21 __attribute__((__noinline__))
22 void fun(int param) {
23 //// Make sure first step is in 'fun'.
24 volatile int step = 0; // DexLabel('fun1')
25 use(&param);
26 return; // DexLabel('fun2')
29 int main() {
30 fun(5);
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({
39 'frames': [
40 { 'function': 'use',
41 'location': { 'lineno': ref('use1') },
43 { 'function': 'fun',
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'))