aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/cobol.dg/group2/FUNCTION_MODULE-NAME.cob
blob: cbb445f09ed4a283f5cd580c7912f41e0dd4f50d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
       *> { dg-do run }
       *> { dg-output-file "group2/FUNCTION_MODULE-NAME.out" }

        identification          division.
        program-id.             level-1.
        data                    division.
        working-storage         section.
        procedure               division.
        display "From level-1:"
        perform                 reportt.
        call                    "level-2"
        goback.
        reportt.
        display "   "  "top-level:  "  """" function module-name(top-level)  """"
        display "   "  "current:    "  """" function module-name(current)    """"
        display "   "  "activating: "  """" function module-name(activating) """"
        display "   "  "nested:     "  """" function module-name(nested)     """"
        display "   "  "stack:      "  """" function module-name(stack)      """"
        continue.
        end program             level-1.

        identification          division.
        program-id.             level-2.
        data                    division.
        working-storage         section.
        procedure               division.
        display "From level-2:"
        perform                 reportt.
        call "level-3"
        goback.
        reportt.
        display "   "  "top-level:  "  """" function module-name(top-level)  """"
        display "   "  "current:    "  """" function module-name(current)    """"
        display "   "  "activating: "  """" function module-name(activating) """"
        display "   "  "nested:     "  """" function module-name(nested)     """"
        display "   "  "stack:      "  """" function module-name(stack)      """"
        continue.
        end program             level-2.

        identification          division.
        program-id.             level-3.
        data                    division.
        working-storage         section.
        procedure               division.
        display "From level-3:"
        perform                 reportt.
        call "level-3a"
        goback.
        reportt.
        display "   "  "top-level:  "  """" function module-name(top-level)  """"
        display "   "  "current:    "  """" function module-name(current)    """"
        display "   "  "activating: "  """" function module-name(activating) """"
        display "   "  "nested:     "  """" function module-name(nested)     """"
        display "   "  "stack:      "  """" function module-name(stack)      """"
        continue.

        identification          division.
        program-id.             level-3a.
        data                    division.
        working-storage         section.
        procedure               division.
        display "From level-3a:"
        perform                 reportt.
        call "level-3b"
        goback.
        reportt.
        display "   "  "top-level:  "  """" function module-name(top-level)  """"
        display "   "  "current:    "  """" function module-name(current)    """"
        display "   "  "activating: "  """" function module-name(activating) """"
        display "   "  "nested:     "  """" function module-name(nested)     """"
        display "   "  "stack:      "  """" function module-name(stack)      """"
        continue.
        
        identification          division.
        program-id.             level-3b.
        data                    division.
        working-storage         section.
        procedure               division.
        display "From level-3b:"
        perform                 reportt.
        call "level-3c"
        goback.
        reportt.
        display "   "  "top-level:  "  """" function module-name(top-level)  """"
        display "   "  "current:    "  """" function module-name(current)    """"
        display "   "  "activating: "  """" function module-name(activating) """"
        display "   "  "nested:     "  """" function module-name(nested)     """"
        display "   "  "stack:      "  """" function module-name(stack)      """"
        continue.

        identification          division.
        program-id.             level-3c.
        data                    division.
        working-storage         section.
        procedure               division.
        display "From level-3c:"
        perform                 reportt.
        goback.
        reportt.
        display "   "  "top-level:  "  """" function module-name(top-level)  """"
        display "   "  "current:    "  """" function module-name(current)    """"
        display "   "  "activating: "  """" function module-name(activating) """"
        display "   "  "nested:     "  """" function module-name(nested)     """"
        display "   "  "stack:      "  """" function module-name(stack)      """"
        continue.
        end program             level-3c.
        end program             level-3b.
        end program             level-3a.
        end program             level-3.