[llvm-bugs] [Bug 46792] New: ARM long double NaN cannot be negated
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 21 10:00:30 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46792
Bug ID: 46792
Summary: ARM long double NaN cannot be negated
Product: clang
Version: 10.0
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: tydeman at tybor.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Using the following code to generate two NaNs, but with opposite signs, fails.
volatile long double ld_pnan, ld_mnan;
ld_pnan = 0.L / 0.L; /* NAN of either sign */
ld_mnan = -ld_pnan; /* flip sign -- fails */
Using __builtin_nanl("") in place of 0.L/0.L gets same failure.
It works for double and float.
This is on ARM cortex A53 with clang 10.0.0 on Manjaro Linux.
# flags for compiler
export CFLAGS="-H -std=c2x -O0 -m64 -march=armv8-a -mcpu=cortex-a53 \
-ffp-model=strict \
-ffp-exception-behavior=strict \
-fhonor-infinities \
-fhonor-nans \
-fmath-errno \
-fno-associative-math \
-fno-builtin \
-fno-finite-math-only \
-fno-reciprocal-math \
-fno-unsafe-math-optimizations \
-frounding-math \
-fsigned-zeros \
-fstrict-float-cast-overflow \
-ftrapping-math \
-Xclang -disable-llvm-optzns \
${INCS}"
--
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/20200721/ba34c454/attachment-0001.html>
More information about the llvm-bugs
mailing list