aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/PowerPC/musttail-weak.c
blob: 1070b91bc5f35d75a9d4a695d2f877bd5a5f2047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -o /dev/null -emit-llvm -verify=aix
// RUN: %clang_cc1 %s -triple powerpc-ibm-aix-xcoff -o /dev/null -emit-llvm -verify=aix
// RUN: %clang_cc1 %s -triple powerpc64-unknown-linux-gnu -o /dev/null -emit-llvm -verify=linux
// RUN: %clang_cc1 %s -triple powerpc64le-unknown-linux-gnu -o /dev/null -emit-llvm -verify=linux

__attribute__((weak)) int func2(int i) {
  return 0;
}
int external_call2(int i) {
  // linux-error@+2 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
  // aix-error@+1 {{'musttail' attribute is not supported on AIX}}
  [[clang::musttail]] return func2(i);
}