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

            Bug ID: 46183
           Summary: Reading block address array from LLVM assembly file
                    changes the target block
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: timothy.werq...@guardsquare.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 23569
  --> https://bugs.llvm.org/attachment.cgi?id=23569&action=edit
The LLVM assembly file that reproduces the issue

I have an LLVM assembly file which will be read incorrectly by LLVM.
The array of block addresses `bbAdresses` contains several targets in the main
function. But when read by llvm-as and then disassembled by llvm-dis, all
elements of the array will point to the unnamed basic block.

So just doing `llvm-as -o - broken.ll | llvm-dis -o -` will output the
incorrect array.
When compiling the file using `clang` it will produce an infinite loop as the
targets of all indirect branches have been changed to the same basic block.

I tested using both the brew clang-8 toolchain and the default Apple clang
version 11.0.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to