[Bug fortran/89266] ICE with TRANSFER of len=0 character array constructor

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Sun Feb 10 20:27:00 GMT 2019


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

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gmx dot de

--- Comment #3 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Thomas Koenig from comment #0)
> $ cat tst3.f90 
> program test
>   implicit none
>   integer :: i
>   character(*), parameter :: y = ''
>   character(*), parameter     :: z = transfer ([''], y)
> end

Funny, I do not get an ICE for the first test case here with
trunk rev.268753 on x86_64-pc-linux-gnu, even after adding a

  print *, z, len (z)

which gives

% ./a.out | cat -ve
            0$

and which seems correct.


More information about the Gcc-bugs mailing list