https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94035
--- Comment #5 from Alexander Cherepanov <ch3root at openwall dot com> ---
I see. But the problem with decimal floating-point formats remains...
Based on bug 93806, comment 41, here is an example with equal but different
values:
----------------------------------------------------------------------
#include <stdio.h>
__attribute__((noipa)) // imagine it in a separate TU
static _Decimal32 opaque(_Decimal32 d) { return d; }
int main()
{
_Decimal32 x = opaque(1.0DF);
unsigned char *p = (unsigned char *)&x;
if (x == 1.00DF)
printf("%d\n", p[0]);
printf("%d\n", p[0]);
}
----------------------------------------------------------------------
$ gcc -std=c2x -pedantic -Wall -Wextra test.c && ./a.out
10
10
$ gcc -std=c2x -pedantic -Wall -Wextra -O3 test.c && ./a.out
100
10
----------------------------------------------------------------------
gcc x86-64 version: gcc (GCC) 10.0.1 20200305 (experimental)
----------------------------------------------------------------------
And then there are non-canonical representations for DFP values...