https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123869
Bug ID: 123869
Summary: Negation of _Float16 can yield a different value at
-O0
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: antoyo at gcc dot gnu.org
Target Milestone: ---
Created attachment 63520
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63520&action=edit
Reproducer for the bug
Hi.
When running the attached program on x86-64 when compiled at -O1, -O2 or -O3,
we get the following output:
left: 32256
right: 31786
left: 65024
right: 64554
But when using -O0, we get:
left: 32256
right: 31786
left: 65024
right: 65066
(the last value is different)
I observed the same behavior with Clang.