blob: 06c0726d3d1e1f24f62e8e7f71943dd979e0ab04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// RUN: %clang_cc1 %s -triple mipsel-unknown-linux-gnu -o /dev/null -emit-llvm -verify
// Test musttail with weak functions.
// Weak functions can be interposed, so they are not considered DSO-local.
__attribute__((weak)) int weak_func(int i) {
return i;
}
int caller(int i) {
// expected-error@+1 {{'musttail' attribute for this call is impossible because calls outside the current linkage unit cannot be tail called on MIPS}}
[[clang::musttail]] return weak_func(i);
}
|