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

G. Steinmetz <gs...@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from G. Steinmetz <gs...@t-online.de> ---

This variant compiles and runs, but should also give an error :


$ cat z2.f90
program p
   character(3), allocatable :: y(:)
   y = ['abc', 'xyz']
   call s(y)
contains
   subroutine s(x)
      character(*), allocatable :: x(:)
      integer :: i
      print *, [(len_trim(x(i)), i=1,size(x%len))]
   end
end


$ gfortran-12-20211003 z2.f90 && ./a.out
           3           3
$

Reply via email to