[llvm-bugs] [Bug 32463] New: Discrepancy between Language Reference Manual and linker behavior: uniqueing identified types

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 29 14:04:24 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32463

            Bug ID: 32463
           Summary: Discrepancy between Language Reference Manual and
                    linker behavior: uniqueing identified types
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
          Assignee: unassignedbugs at nondot.org
          Reporter: hardekopf at google.com
                CC: llvm-bugs at lists.llvm.org

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
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170329/2713bb98/attachment-0001.html>


More information about the llvm-bugs mailing list