aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/parameter_array_init_5.f90
blob: 0f4127af271831ca367221b696f87f59fa49afd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do run }
!
! PR fortran/41515
! Contributed by ros@rzg.mpg.de.
!
! Before, the "parm' string array was never initialized.
!
Module BUG3
contains
    Subroutine SR
    character(3)   :: parm(5)
    character(20)  :: str
    parameter(parm=(/'xo ','yo ','ag ','xr ','yr '/))

    str =    'XXXXXXXXXXXXXXXXXXXX'
    if(str /='XXXXXXXXXXXXXXXXXXXX') call abort()
    write(str,*) parm
    if(str /= ' xo yo ag xr yr') call abort()
    end subroutine SR
end Module BUG3
!
program TEST
    use bug3
    call sr
end program TEST