1 //===-- main.cpp ------------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 void __attribute__((noinline)) sink() {
15 void __attribute__((noinline)) func3() { sink(); /* tail */ }
17 void __attribute__((disable_tail_calls, noinline)) func2() { func3(); /* regular */ }
19 void __attribute__((noinline)) func1() { func2(); /* tail */ }
21 int __attribute__((disable_tail_calls)) main() {
22 func1(); /* regular */