[Bug c/122203] New: FMV gives wrong result with C FE?
sjames at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 8 06:37:37 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122203
Bug ID: 122203
Summary: FMV gives wrong result with C FE?
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
With -mavx2, this testcase works for me with C++ and aborts with C:
```
__attribute__ ((target ("default")))
int foo ()
{
return 0;
}
__attribute__ ((target ("avx2")))
int foo ()
{
return 1;
}
int main ()
{
#ifdef __AVX2__
if (foo () != 1)
__builtin_abort();
#else
if (foo () != 0)
__builtin_abort();
#endif
return 0;
}
```
More information about the Gcc-bugs
mailing list