https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111646
--- Comment #2 from vishwambhar.rathi at puresoftware dot com --- Thanks. I am using Ubuntu 20.04. Could this be related to that? Or should I post it on qemu? ________________________________ From: pinskia at gcc dot gnu.org <gcc-bugzi...@gcc.gnu.org> Sent: 30 September 2023 14:15 To: Vishwambhar Rathi <vishwambhar.ra...@puresoftware.com> Subject: [Bug middle-end/111646] cos function giving different result for the same input value [You don't often get email from gcc-bugzi...@gcc.gnu.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111646 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING Last reconfirmed| |2023-09-30 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Works for me on a physical hardware: ``` ubuntu@ubuntu:~/src\# gcc t.c -lm ubuntu@ubuntu:~/src\# ./a.out x -9311848.013224 cosx_1 -0.634393 x -9311848.013224 cosx_2 -0.634393 ubuntu@ubuntu:~/src\# gcc t.c -lm -O1 ubuntu@ubuntu:~/src\# ./a.out x -9311848.013224 cosx_1 -0.634393 x -9311848.013224 cosx_2 -0.634393 ubuntu@ubuntu:~/src\# gcc t.c -lm -O2 ubuntu@ubuntu:~/src\# ./a.out x -9311848.013224 cosx_1 -0.634393 x -9311848.013224 cosx_2 -0.634393 ubuntu@ubuntu:~/src\# uname -a Linux ubuntu 5.4.74-10348-gabddb56e7886 #1 SMP PREEMPT Fri Mar 5 18:58:46 PST 2021 aarch64 aarch64 aarch64 GNU/Linux ubuntu@ubuntu:~/src\# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic ubuntu@ubuntu:~/src\# lscpu Architecture: aarch64 Byte Order: Little Endian CPU(s): 24 On-line CPU(s) list: 0-23 Thread(s) per core: 1 Core(s) per socket: 24 Socket(s): 1 Vendor ID: Cavium Model: 0 Stepping: 0x2 BogoMIPS: 200.00 L1d cache: 41K L1i cache: 66K L2i cache: 1280K L3 cache: 14336K Flags: fp asimd aes pmull sha1 sha2 crc32 atomics cpuid asimdrdm dcpop ``` Maybe this is a bug in qemu. -- You are receiving this mail because: You reported the bug.