Issue |
81043
|
Summary |
[FMV] mangling of forward-declared multi-versioned callee differs between gcc and clang
|
Labels |
clang
|
Assignees |
|
Reporter |
jroelofs
|
https://clang.godbolt.org/z/zeeTxd3va
```
__attribute__((target_version("fp16")))
void foo(void);
__attribute__((target_version("fp16fml")))
void foo(void);
__attribute__((target_version("default")))
void foo(void);
void caller() {
foo();
}
```
Note how clang calls it `_Z3foov.ifunc`, and gcc refers to it as `_Z3foov`. IMO gcc's behavior is the desirable one: it lets you forward-declare foo in a header without having to promise that the implementation is multi-versioned. This is useful for libraries that have to provide a stable ABI to be able to adopt FMV in the implementation of those interfaces, without having to write an excessive number of shims.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs