<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 - Discrepancy between Language Reference Manual and linker behavior: uniqueing identified types"
href="https://bugs.llvm.org/show_bug.cgi?id=32463">32463</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Discrepancy between Language Reference Manual and linker behavior: uniqueing identified types
</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>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Linker
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hardekopf@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The language reference manual in section High Level Structure, subsection
Structure Types states: "Literal types are uniqued structurally, but identified
types are never uniqued.". However, the linker does unique structurally
identical identified types.
It would be useful for whole-program analysis if the language reference manual
specification is the intended behavior.
Example:
user:~$ echo '%x = type { i8 } define void @X(%x*) { ret void }' |
llvm/build/bin/llvm-as -o 1.bc
user:~$ echo '%y = type { i8 } define void @Y(%y*) { ret void }' |
llvm/build/bin/llvm-as -o 2.bc
user:~$ llvm/build/bin/llvm-link 1.bc 2.bc -o 3.bc
user:~$ llvm/build/bin/llvm-dis < 3.bc
; ModuleID = '<stdin>'
source_filename = "llvm-link"
%x = type { i8 }
define void @X(%x*) {
ret void
}
define void @Y(%x*) {
ret void
}</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>