This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50221] New: Allocatable string length fails with array assignment
- From: "clivegpage at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 28 Aug 2011 16:08:16 +0000
- Subject: [Bug fortran/50221] New: Allocatable string length fails with array assignment
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50221
Bug #: 50221
Summary: Allocatable string length fails with array assignment
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: clivegpage@gmail.com
The program below:
program testalloc
implicit none
character(:), allocatable, dimension(:) :: array
array = (/'xx', 'yy', 'zz'/)
print *, 'array=', array, len(array(1)), size(array)
end program
Should print out something like:
array=xxyyzz 2 3
but with gfortran (v4.6.0) I get
array=zzzzzz 2 3