[llvm-bugs] [Bug 34645] New: Possible bug: LTO, LLVM 5.0.0, mac OS: certain calls get shadowed by functions from system library given -flto flag provided and do not otherwise
llvm-bugs at lists.llvm.org
Sat Sep 16 12:35:02 PDT 2017
Bug ID: 34645
Summary: Possible bug: LTO, LLVM 5.0.0, mac OS: certain calls
get shadowed by functions from system library given
-flto flag provided and do not otherwise
OS: MacOS X
Assignee: unassignedbugs at nondot.org
Reporter: s.pankevich at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19166
Minimal reproducible example
Please find the following minimal reproducible example in the attached:
This project is a very simplified setup extracted from openlibm library:
High quality system independent, portable, open source libm implementation
This repo has a function acos, certain calls to which seem to get shadowed by
acos function from the standard library given the -flto flag is added. What is
weird that there is no symmetry between compilation with and without -flto
flag: only certain calls are shadowed while the rest still go through the
custom acos function. For a contrast another function custom_acos is added - it
is always called consistently with or without -flto flag (no shadowing occurs).
Important observation: valid inputs for acos function from the standard library
are within range [-1, 1], for all other inputs it produces nan. In the logs for
-flto below the calls of this function with invalid inputs like nan, -1.1, 1.1
do not get shadowed!
This issue is likely to affect all of the functions from openlibm library which
interfere with the their corresponding functions from math.h.
The code is also pushed here:
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs