[Bug fortran/83980] Various issues with character length in array constructors

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Tue Jan 23 21:27:00 GMT 2018


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

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #2 from Harald Anlauf <anlauf at gmx dot de> ---
A variant with wrong code:

program gfcbug147a
  implicit none
  type t
     character(len=8) :: name
  end type t
  type(t)      ,parameter :: o(*) = [ t('RADAR') ]
  character(*) ,parameter :: name = o(1)% name
  print *, len(o(1)% name)
  print *, len(      name)
end program gfcbug147a

% gfc-x gfcbug147a.f90 && ./a.out 
           8
           5

I'll see if I can find related bugs.


More information about the Gcc-bugs mailing list