[Bug fortran/89077] ICE using * as len specifier for character parameter

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Thu Jan 31 22:18:00 GMT 2019


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

--- Comment #7 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Harald Anlauf from comment #6)

Playing around and getting completely lost during a gdb session,
I became suspicious that the second issue has to do with missed
padding that interestingly occurs also with Hollerith constants:

program pr89077_3
  implicit none
  integer,      parameter :: m = 20
  character(*), parameter :: s = 'Forward'
  character(m), parameter :: t = s
  character(m), parameter :: u = transfer (s, s)
  character(m), parameter :: v = 7HFORWARD
  character(m), parameter :: w = transfer (s, s) // ""
  print *, t, '#'
  print *, u, '#'
  print *, v, '#'
  print *, w, '#'
end program pr89077_3

This prints:

 % ./a.out | cat -v
 Forward             #
 Forward^@^@^@Q^@M-P^@p^@^@^@^@a#
 FORWARD ^@^@Q^@M-P^@M-Pa^H^@M-ha#
 Forward             #


More information about the Gcc-bugs mailing list