Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.fortran-torture / execute / initializer.f90
blob55cc185f370a262c2746bb4daf8ba84227ca1213
1 ! Program to test static variable initialization
2 ! returns the parameter from the previous invocation, or 42 on the first call.
3 function test (parm)
4 implicit none
5 integer test, parm
6 integer :: val = 42
8 test = val
9 val = parm
10 end function
12 program intializer
13 implicit none
14 integer test
15 character(11) :: c = "Hello World"
16 character(15) :: d = "Teststring"
17 integer, dimension(3) :: a = 1
19 if (any (a .ne. 1)) call abort
20 if (test(11) .ne. 42) call abort
21 ! The second call should return
22 if (test(0) .ne. 11) call abort
24 if (c .ne. "Hello World") call abort
25 if (d .ne. "Teststring") call abort
26 end program