aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-01 01:08:36 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-01 01:08:36 +0100
commit4f75543dc417cee2db2fc46f516f7e3137e4b250 (patch)
tree76345135bc4cf391e0112a78063393252d647b69 /gcc/fortran/module.c
parent4f4753914455ad186f7c1f994743abfcb05a7dc9 (diff)
downloadgcc-4f75543dc417cee2db2fc46f516f7e3137e4b250.zip
gcc-4f75543dc417cee2db2fc46f516f7e3137e4b250.tar.gz
gcc-4f75543dc417cee2db2fc46f516f7e3137e4b250.tar.bz2
PR libstdc++/61761 fix std::proj for targets without C99 cproj
The current generic implementation of __complex_proj used when cproj is not available calculates the wrong projection, giving a different result than given by C99's cproj. When C99 cproj is not available but isinf and copysign are, use those to give correct results for float, double and long double. Otherwise, and for other specializations of std::complex, just use a generic version that returns its argument, and so doesn't support infinities. We might want to consider adding additional overloads of __complex_proj to support extended types such as _Float64x, _Float128 etc. PR libstdc++/61761 * include/std/complex (__complex_proj): Return parameter unchanged. [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for floating-point types to take std::complex arguments. [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for floating-point types. * testsuite/26_numerics/complex/proj.cc: New test. From-SVN: r270759
Diffstat (limited to 'gcc/fortran/module.c')
0 files changed, 0 insertions, 0 deletions