https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #13 from Дилян Палаузов ---
For clang being buggy from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679#c11 I filled
https://github.com/llvm/llvm-project/issues/81358 .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
Eric Gallager changed:
What|Removed |Added
CC||egallager at gcc dot gnu.org
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #11 from Jakub Jelinek ---
Anyway, seems clang is buggy:
clang -O2 -m32 -mno-sse -mfpmath=387 -fexcess-precision=standard
#include
int
main ()
{
#if FLT_EVAL_METHOD == 2 && LDBL_MANT_DIG == 64 && DBL_MANT_DIG == 53
if ((double)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #10 from Jakub Jelinek ---
Oh, you mean the pow equality comparison. I think you should study something
about floating point, errors, why equality comparisons of floating point values
are usually a bad idea etc.
There is no gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #9 from Jakub Jelinek ---
That is not what I read from what you've posted, -fexcess-precision=standard is
consistent between the compilers, -fexcess-precision=fast is not (and doesn't
have to be), neither between different
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #8 from Дилян Палаузов ---
-fexcess-precision=standard does not ensure consistent behaviour between gcc
13.2.1 20231205 (Red Hat 13.2.1-6) and clang 17.0.5. -msse2 -mfpmath=sse does
for diff.c:
#include
#include
int main(void) {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #6 from Andrew Pinski ---
Because 64bit uses the SSE2 fp instructions rather than x87 fp instructions.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #5 from Дилян Палаузов ---
gcc -m64 -fexcess-precision=fast -o diff diff.c && ./diff
0.00
gcc -m32 -fexcess-precision=fast -o diff diff.c && ./diff
-2.00
clang -m32 -fexcess-precision=fast -o diff diff.c && ./diff
0.00
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #4 from Jakub Jelinek ---
Yeah, it is, that is how excess precision behaves.
Due to the cast applying just to l rather than l - d it returns 0.0 with
-fexcess-precision=standard, but if you change it to (double)(l - d) then it
will
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
--- Comment #2 from Дилян Палаузов ---
This happens only without optimizations:
$ gcc -O0 -m32 -o diff diff.c && ./diff
-2.00
$ gcc -O1 -m32 -o diff diff.c && ./diff
0.00
$ gcc -O2 -m32 -o diff diff.c && ./diff
0.00
$ gcc -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113679
Andrew Pinski changed:
What|Removed |Added
Component|c |target
--- Comment #1 from Andrew
13 matches
Mail list logo