https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50221

Arjen Markus <arjen.markus895 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arjen.markus895 at gmail dot 
com

--- Comment #4 from Arjen Markus <arjen.markus895 at gmail dot com> ---
I had a probably related failure with the following program using 4.9.2 under
Cygwin. 

The program:

! chk_alloc_string.f90 --
!     Check if allocatable-length strings work in principle
!
program chk_alloc_string
    implicit none

    character(len=:), dimension(:), allocatable :: strings
    integer :: i

    allocate( character(10):: strings(1:3) )

    !strings = [ "A", "C", "ABCDE", "V" ]
    strings = [ character(len=4) :: "A", "C", "ABCDE", "V" ]

    write(*,*) len(strings(1)), size(strings)
    write(*,'(a)') strings
end program chk_alloc_string

The output:

           4           4
ACAV
CAV 
AV  
V    

where I expected:
           4           4
A
C
ABCD
V

Reply via email to