[llvm-bugs] [Bug 42993] New: Type was merged incorrectly due to structure equality during llvm-link

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 14 02:17:15 PDT 2019


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

            Bug ID: 42993
           Summary: Type was merged incorrectly due to structure equality
                    during llvm-link
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-link
          Assignee: unassignedbugs at nondot.org
          Reporter: yuanting at ict.ac.cn
                CC: llvm-bugs at lists.llvm.org

reproduce: (Sorry for exceeding the file size limit)

Download https://github.com/timmyyuan/LLVMBugReport/blob/master/b065_go_.o.bc
(765KB) and
https://github.com/timmyyuan/LLVMBugReport/blob/master/b069_go_.o.bc (2.43M)

llvm-link b065_go_.o.bc b069_go_.o.bc -o output.bc
llvm-dis b069_go_.o.bc
llvm-dis output.bc

In b069_go_.o.ll, the second parameter type of function
"google.golang.org..z2fgrpc..z2finternal..z2ftransport.inFlow.maybeAdjust" is
%".google.golang.org/grpc/internal/transport.inFlow.0"*, which declared as

%".google.golang.org/grpc/internal/transport.inFlow.0" = type { %Mutex.0, i32,
i32, i32, i32 }
%Mutex.0 = type { i32, i32 }

but in output.ll, the second parameter type of this function is %RWMutex.0*,
which declared as

%RWMutex.0 = type { %Linger.0, i32, i32, i32, i32 }
%Linger.0 = type { i32, i32 }

If we reverse the link order, i.e.

llvm-link b069_go_.o.bc b065_go_.o.bc -o output.bc

the phenomenon above will disappear.

llvm-dis -version:
LLVM (http://llvm.org/):
  LLVM version 10.0.0svn
  DEBUG build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake

uname -a:
Linux yt 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64
x86_64 x86_64 GNU/Linux

llvm last commit id:
cc611e1756a8601fc377ebf854d419de9db7d783

-- 
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/20190814/ac725478/attachment.html>


More information about the llvm-bugs mailing list