PR rtl-optimization/82913
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / common_init_1.f90
blob9e5aec0f72623f413fc66d49bd979b594503a7d0
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
9 if ((d .ne. 42) .or. (e .ne. 43) .or. (f .ne. 2.0)) call abort ()
10 if (c .ne. "Hello World ") call abort ()
11 end subroutine
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"/
22 call test ()
23 end program