mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-24 12:34:19 +00:00
Add a test for PR33166.
This tests optimized code where a variable is allocated on the stack for some part of the function. llvm-svn: 303903
This commit is contained in:
parent
b3d83a092a
commit
efd2b8f824
18
debuginfo-tests/stack-var.c
Normal file
18
debuginfo-tests/stack-var.c
Normal file
@ -0,0 +1,18 @@
|
||||
// RUN: %clang %target_itanium_abi_host_triple %s -O -o %t.out -g
|
||||
// RUN: %test_debuginfo %s %t.out
|
||||
|
||||
void __attribute__((noinline)) bar(int *test) {}
|
||||
int main() {
|
||||
int test;
|
||||
test = 23;
|
||||
// DEBUGGER: break 12
|
||||
// DEBUGGER: r
|
||||
// DEBUGGER: p test
|
||||
// CHECK: 23
|
||||
bar(&test);
|
||||
// DEBUGGER: break 17
|
||||
// DEBUGGER: c
|
||||
// DEBUGGER: p test
|
||||
// CHECK: 23
|
||||
return test;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user