Debian Codegraph @

gcc/testsuite/gfortran.dg/parameter_array_init_5.f90

raw
1 ! { dg-do run }
2 !
3 ! PR fortran/41515
4 ! Contributed by [email protected].
5 !
6 ! Before, the "parm' string array was never initialized.
7 !
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 '/))
14
15 str = 'XXXXXXXXXXXXXXXXXXXX'
16 if(str /='XXXXXXXXXXXXXXXXXXXX') STOP 1
17 write(str,*) parm
18 if(str /= ' xo yo ag xr yr') STOP 2
19 end subroutine SR
20 end Module BUG3
21 !
22 program TEST
23 use bug3
24 call sr
25 end program TEST