etc/services - sync with NetBSD-8
[minix.git] / external / bsd / llvm / dist / clang / utils / TestUtils / deep-stack.py
blob1750a5fca031da62783666b81da076e3f7846dee
1 #!/usr/bin/env python
3 def pcall(f, N):
4 if N == 0:
5 print >>f, ' f(0)'
6 return
8 print >>f, ' f('
9 pcall(f, N - 1)
10 print >>f, ' )'
12 def main():
13 f = open('t.c','w')
14 print >>f, 'int f(int n) { return n; }'
15 print >>f, 'int t() {'
16 print >>f, ' return'
17 pcall(f, 10000)
18 print >>f, ' ;'
19 print >>f, '}'
21 if __name__ == "__main__":
22 import sys
23 sys.setrecursionlimit(100000)
24 main()