xref: /original-bsd/usr.bin/f77/tests/tests/fs052.f (revision 72b8f354)
1c
2c     comment section
3c
4c     fs052
5c
6c          fs052 is a subroutine subprogram which is called by the main
7c     program fm050.  no arguments are specified therefore all
8c     parameters are passed via unlabeled common.  the subroutine fs052
9c     increments the value of one integer variable by 1,2,3,4 or 5
10c     depending on the value of a second integer variable and then
11c     returns control to the calling program fm050.  several return
12c     statements are included.
13c
14c      references
15c        american national standard programming language fortran,
16c              x3.9-1978
17c
18c        section 15.6, subroutines
19c        section 15.8, return statement
20c
21c     test section
22c
23c         subroutine subprogram - no arguments, many returns
24c
25      subroutine fs052
26      common rvdn01,ivcn01,ivcn02
27      go to (10,20,30,40,50),ivcn02
2810    ivcn01 = ivcn01 + 1
29      return
3020    ivcn01 = ivcn01 + 2
31      return
3230    ivcn01 = ivcn01 + 3
33      return
3440    ivcn01 = ivcn01 + 4
35      return
3650    ivcn01 = ivcn01 + 5
37      return
38      end
39