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: unassignedclangb...@nondot.org
          Reporter: tyde...@tybor.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to