blob: 66b4c3fea09d71a2fa6cfa1ce0d1bbd80b2df10e [file] [log] [blame]
John Kessenich2ecdd142013-10-01 21:58:43 +00001#version 330 core
2
3// cross-unit recursion
4
5void main() {}
6
7// two-level recursion
8
9float cbar(int);
10
11void cfoo(float)
12{
13 cbar(2);
14}
15
16// four-level, out of order
17
18void CB();
19void CD();
20void CA() { CB(); }
21void CC() { CD(); }
22
23// high degree
24
25void CBT();
26void CDT();
27void CAT() { CBT(); CBT(); CBT(); }
28void CCT() { CDT(); CDT(); CBT(); }
John Kessenich8cbd18e2013-10-30 01:22:04 +000029
30// not recursive
31
32void norA() {}
33void norB() { norA(); }
34void norC() { norA(); }
35void norD() { norA(); }
36void norE() { norB(); }
37void norF() { norB(); }
38void norG() { norE(); }
39void norH() { norE(); }
40void norI() { norE(); }
41
42// not recursive, but with a call leading into a cycle if ignoring direction
43
44void norcA() { }
45void norcB() { norcA(); }
46void norcC() { norcB(); }
47void norcD() { norcC(); norcB(); } // head of cycle
48void norcE() { norcD(); } // lead into cycle