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

            Bug ID: 45034
           Summary: Code compiled with -Ofast fails to find math symbols.
                    (eg  `__expf_finite')
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Created attachment 23175
  --> https://bugs.llvm.org/attachment.cgi?id=23175&action=edit
simple testcase.

Hey,

After some recent changes, various projects fail to compile with clang when
using -Ofast ( or -O2 -ffast-math ). Example bugs from the web:

https://github.com/cms-sw/cmssw/issues/24935
https://github.com/dpiparo/vdt/issues/11

https://bugs.archlinux.org/task/65541

I have attached a sample file that triggers the bug, taken from the Arch
bugtracker:

clang++ bug.cpp works
clang++ bug.cpp -Ofast fails with:

/usr/bin/ld: /tmp/bug-6a1f7c.o: in function `main':
bug.cpp:(.text+0xd): undefined reference to `__expf_finite'
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)

According to the arch user, this is likely related to
https://reviews.llvm.org/D74712

Cheers,

Nick

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

Reply via email to