[Bug middle-end/121017] New: `__builtin_copysign(0.0, a)` should be optimized to 0.0 for -fno-signed-zeros
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 9 18:46:52 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121017
Bug ID: 121017
Summary: `__builtin_copysign(0.0, a)` should be optimized to
0.0 for -fno-signed-zeros
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
>From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121004#c7 :
```
float f(float a)
{
return __builtin_copysignf(0.0, a);
}
```
This should just be 0.0 with -fno-signed-zeros
More information about the Gcc-bugs
mailing list