]> Cypherpunks.ru repositories - gostls13.git/blob - misc/cgo/testcarchive/testdata/main9.c
runtime: get a better g0 stack bound in needm
[gostls13.git] / misc / cgo / testcarchive / testdata / main9.c
1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 #include "libgo9.h"
6
7 void use(int *x) { (*x)++; }
8
9 void callGoFWithDeepStack() {
10         int x[10000];
11
12         use(&x[0]);
13         use(&x[9999]);
14
15         GoF();
16
17         use(&x[0]);
18         use(&x[9999]);
19 }
20
21 int main() {
22         GoF();                  // call GoF without using much stack
23         callGoFWithDeepStack(); // call GoF with a deep stack
24 }