This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/48543] Collapse identical strings


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48543

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-06-07 14:58:38 UTC ---
I'll do a bit of work on that, because it can also be useful
for reducing memcpy/memset pairs.

Consider

  character(len=3) :: a
  character(len=4) :: b
  a = 'a'
  b = 'a'

This could be changed into (in a first pass)

  a = 'a   '
  b = 'a    '

for a simple assignment, but this would mean duplicate strings.
Better to change this into

  a = 'a    '
  b = 'a    '


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]