[Bug fortran/50221] New: Allocatable string length fails with array assignment

clivegpage at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Aug 28 21:40:00 GMT 2011


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



More information about the Gcc-bugs mailing list