| Issue |
241732
|
| Summary |
[Mips][clang] mysterious musttail failures within the same linkage unit
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
chenx97
|
The following C code fails to compile with -fPIC when targeting `mipsel-unknown-linux-gnu`.
```C
int callee(int);
int caller(int x) { [[clang::musttail]] return callee(x); }
int callee(int x) { return x + 1; }
```
With `-fPIC` and any optimization level, this code fails to compile with
```
stdin>:3:48: error: 'musttail' attribute for this call is impossible because calls outside the current linkage unit cannot be tail called on MIPS
3 | int caller(int x) { [[clang::musttail]] return callee(x); }
| ^
1 error generated.
```
and can be circumvented by `-fvisibility=hidden`. Is there a better solution, or maybe just better error messages, for default-visibility callees?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs