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

inline int foo(int x) {
  return x;
}

int bar(int x)
{
  // expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
  [[clang::musttail]] return foo(1);
}