PR c/29467
[official-gcc.git] / gcc / testsuite / gfortran.dg / parameter_array_init_5.f90
blob0f4127af271831ca367221b696f87f59fa49afd7
1 ! { dg-do run }
3 ! PR fortran/41515
4 ! Contributed by ros@rzg.mpg.de.
6 ! Before, the "parm' string array was never initialized.
8 Module BUG3
9 contains
10 Subroutine SR
11 character(3) :: parm(5)
12 character(20) :: str
13 parameter(parm=(/'xo ','yo ','ag ','xr ','yr '/))
15 str = 'XXXXXXXXXXXXXXXXXXXX'
16 if(str /='XXXXXXXXXXXXXXXXXXXX') call abort()
17 write(str,*) parm
18 if(str /= ' xo yo ag xr yr') call abort()
19 end subroutine SR
20 end Module BUG3
22 program TEST
23 use bug3
24 call sr
25 end program TEST