[llvm-bugs] [Bug 47662] New: libcxx, `std::sqrt(std::complex<int>(2))` doesn't compile
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Sep 27 15:10:18 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47662
Bug ID: 47662
Summary: libcxx, `std::sqrt(std::complex<int>(2))` doesn't
compile
Product: libc++
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: jdoerfert at anl.gov
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com,
xw111luoye at gmail.com
The complex header in libcxx (and its copy for use in OpenMP target regions) do
not properly call `polar` for complex integers. While this can be resolved by
explicit instantiation of polar, my initial experiments suggested this will not
match the expected outcome.
Minimal reproducer: https://godbolt.org/z/jWGzj7
```
#include <complex>
#include <cmath>
std::complex<int> foo () {
return std::sqrt(std::complex<int>(2));
}
```
Found as part of PR47655.
--
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/20200927/eafcc595/attachment.html>
More information about the llvm-bugs
mailing list