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:
Adrian Prantl 2017-05-25 19:33:16 +00:00
parent b3d83a092a
commit efd2b8f824
1 changed files with 18 additions and 0 deletions

View 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;
}