blob: bcad84d63f19349ba528d3821e8175d8a894116b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// RUN: %clang_cc1 %s -triple mipsel-unknown-linux-gnu -pic-level 2 \
// RUN: -fhalf-no-semantic-interposition -o /dev/null -emit-llvm -verify
// Test musttail behavior in PIC mode with semantic interposition.
int external_defined(int i) { return i; }
static int static_func(int i) { return i; }
__attribute__((visibility("hidden"))) int hidden_defined(int i) { return i; }
int call_external(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 external_defined(i);
}
int call_static(int i) {
[[clang::musttail]] return static_func(i);
}
int call_hidden(int i) {
[[clang::musttail]] return hidden_defined(i);
}
|