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

            Bug ID: 40113
           Summary: Error parsing LLVM function without entry label
           Product: new-bugs
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: cont...@yannic-bonenberger.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

Created attachment 21256
  --> https://bugs.llvm.org/attachment.cgi?id=21256&action=edit
C source

Steps to reproduce:
  - Download good.ll (Generated by `clang -S -emit-llvm good.c` and then
manually reduced to a smaller example).
  - Run `lli good.ll` and see that there are no errors.
  - Download bad.ll which removed the entry-label from function @x.
  - Run `lli bad.ll`

What is the expected output:
good.ll and bad.ll should behave exactly the same.
I'm not sure whether good.ll or bad.ll produces the wrong output.
If it's good.ll, then it is a bug in clang's code generation.
Otherwise, it's a bug in the IR parser.

What happens instead:
`lli good.ll` shows no errors, `lli bad.ll` shows the following error:

lli: bad.ll:5:3: error: instruction expected to be numbered '%1'
  %0 = load i32, i32* %a.addr
  ^

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

Reply via email to