Issue 204206
Summary [LTO] Symbols referenced only by llvm.reloc.none are dropped
Labels new issue
Assignees
Reporter Kuree
    See Godbolt here: https://godbolt.org/z/a7bTPacre

Both clang and gcc work fine, but `clang -flto` fails.

This bug is found via compiling llvm-libc with `-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON` on a baremetal RV32 target. See the code below:
https://github.com/llvm/llvm-project/blob/036ef9736e2be6732c63853d1fb00ca0544eba96/libc/src/stdio/baremetal/printf.cpp#L29-L34
In this case `__printf_float` becomes undefined.


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to