OSDN Git Service

2007-03-16 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / parameter_array_dummy.f90
1 ! { dg-do run}
2 ! PR fortran/31188
3 program foo_mod
4   implicit none
5   character (len=1), parameter :: letters(2) = (/"a","b"/)
6   call concat(1, [1])
7   call concat(2, [2])
8   call concat(3, [1,2])
9   call concat(4, [2,1])
10   call concat(5, [2,2,2])
11 contains
12   subroutine concat(i, ivec)
13     integer, intent(in)  :: i, ivec(:)
14     write (*,*) i, "a" // letters(ivec)
15   end subroutine concat
16 end program foo_mod
17 ! { dg-output "1 aa" }
18 ! { dg-output "2 ab" }
19 ! { dg-output "3 aaab" }
20 ! { dg-output "4 abaa" }
21 ! { dg-output "5 ababab" }