...

Text file src/cmd/cgo/internal/testcarchive/testdata/main9.c

Documentation: cmd/cgo/internal/testcarchive/testdata

     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
     7void use(int *x) { (*x)++; }
     8
     9void 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
    21int main() {
    22	GoF();                  // call GoF without using much stack
    23	callGoFWithDeepStack(); // call GoF with a deep stack
    24}

View as plain text