aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/foobar.cpp
blob: 7ace3bbdcecfdc509d311d40a9af3fce5a019a35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace foobar_ns {

int exit_code = 1;

int __declspec(noinline) baz() {
    return exit_code;
}

int __declspec(noinline) bar() {
    return baz() * 2;
}

int __declspec(noinline) foo() {
    return bar() * 2;
}

} // namespace foobar_ns

int main() {
    return foobar_ns::foo() * 2;
}