1// RUN: %clangxx_hwasan -mllvm -hwasan-use-stack-safety=0 %s -o %t
2// RUN: %run %t
3//
4// REQUIRES: pointer-tagging
5
6__attribute__((noinline)) int bar(int X) { return X; }
7
8__attribute__((noinline)) int foo(int X) {
9 volatile int A = 5;
10 [[clang::musttail]] return bar(X: X + A);
11}
12
13int main(int Argc, char *Argv[]) { return foo(X: Argc) != 6; }
14

source code of compiler-rt/test/hwasan/TestCases/musttail.cpp