Using the PARAMETER statement in a module subroutine for assigning values to a character array yields nonsense when printed at runtime. If, instead, the PARAMETER attribute is used, everything is fine.
gfortran -v yields: Using built-in specs. Target: i686-pc-linux-gnu Configured with: /home/jerry/gcc/trunk/configure --prefix=/usr/local/gfortran --enable-languages=c,fortran --disable-libmudflap --enable-libgomp --disable-shared Thread model: posix gcc version 4.5.0 20090922 (experimental) [trunk revision 151967] (GCC) uname -a yields: Linux ros-nb 2.6.25.20-0.5-pae #1 SMP 2009-08-14 01:48:11 +0200 i686 i686 i386 GNU/Linux The following shows the test program: Module BUG3 ! contains ! Subroutine SR ! character(3) :: parm(5) ! parameter(parm=(/'xo ','yo ','ag ','xr ','yr '/)) write(*,*) parm ! end subroutine SR ! end Module BUG3 ! program TEST use bug3 ! call sr ! end program TEST -- Summary: PARAMETER statement in module subrouines Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ros at rzg dot mpg dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41515