[llvm-bugs] [Bug 33831] New: cfi-icall + ThinLTO program containing indirect call to inline function fails to link

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 17 19:04:38 PDT 2017


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

            Bug ID: 33831
           Summary: cfi-icall + ThinLTO program containing indirect call
                    to inline function fails to link
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: peter at pcc.me.uk
                CC: llvm-bugs at lists.llvm.org

$ cat icall.cpp
inline void f() {}

void g(void (*p)()) {
  p();
}

int main() {
  g(f);
}
$ clang++ icall.cpp -fsanitize=cfi-icall -flto=thin -fuse-ld=lld -O2
ld.lld: error: undefined symbol: f() (.cfi)
>>> referenced by ld-temp.o
>>>               lto.tmp:(f())
clang-5.0: error: linker command failed with exit code 1 (use -v to see
invocation)

-- 
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/20170718/f1325207/attachment.html>


More information about the llvm-bugs mailing list