<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Incorrect entry value debug location after parameter modification"
href="https://bugs.llvm.org/show_bug.cgi?id=47628">47628</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect entry value debug location after parameter modification
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.stenberg@ericsson.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com
</td>
</tr></table>
<p>
<div>
<pre>LLVM commit: 310af42ed9ab259ad05ed46d459203b3473ba66e
When compiling the following file:
extern void bar(int);
extern int side_effect, value;
int foo(int param) {
side_effect = param;
param = value;
bar(param);
return 0;
}
using:
$ clang -O1 -g entry-value.c -S
we get entry value DEBUG_VALUEs for `param' even after the parameter has been
modified:
.cfi_startproc
# %bb.0: # %entry
#DEBUG_VALUE: foo:param <- $edi
#DEBUG_VALUE: foo:param <- $edi
pushq %rax
.cfi_def_cfa_offset 16
.Ltmp0:
.loc 1 5 15 prologue_end # entry-value.c:5:15
movl %edi, side_effect(%rip)
.loc 1 6 11 # entry-value.c:6:11
movl value(%rip), %edi
.Ltmp1:
#DEBUG_VALUE: foo:param <- [DW_OP_LLVM_entry_value 1] $edi
#DEBUG_VALUE: foo:param <- $edi
.loc 1 7 3 # entry-value.c:7:3
callq bar
.Ltmp2:
#DEBUG_VALUE: foo:param <- [DW_OP_LLVM_entry_value 1] $edi
.loc 1 8 3 # entry-value.c:8:3
xorl %eax, %eax
popq %rcx
.cfi_def_cfa_offset 8
retq
This means that the parameter will be printed incorrectly (given that there is
a call site value for the parameter in the caller of `foo').</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>