Debian Codegraph @

gcc/testsuite/gfortran.fortran-torture/execute/common_init_1.f90

raw
1 ! Program to test initialization of common blocks.
2 subroutine test()
3 character(len=15) :: c
4 integer d, e
5 real f
6 common /block2/ c
7 common /block/ d, e, f
8
9 if ((d .ne. 42) .or. (e .ne. 43) .or. (f .ne. 2.0)) STOP 1
10 if (c .ne. "Hello World ") STOP 2
11 end subroutine
12
13 program prog
14 integer a(2)
15 real b
16 character(len=15) :: s
17 common /block/ a, b
18 common /block2/ s
19 data b, a/2.0, 42, 43/
20 data s /"Hello World"/
21
22 call test ()
23 end program
24