https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119498
Bug ID: 119498
Summary: Incompatible FMV functions not diagnosed
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: alfierichards at gcc dot gnu.org
Target Milestone: ---
Cases such as
```c
__attribute__ ((target_version("default")))
int foo (int a) {
return 1;
}
__attribute__ ((target_version("sve")))
int foo (int a) {
return 1;
}
__attribute__ ((target_version("sme")))
float foo (int a) {
return 1;
}
```
There the return type is inconsistent and should not be compatible are not
diagnosed and create invalid output.
Aarch64 example
https://godbolt.org/z/E8s71Y1jK
X86 example:
https://godbolt.org/z/nbadoTTMW