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/25714] New: concat of strings create an extra temporary variable


Take:
character(2) :: c
character(1) :: a
character(1) :: b
c = a//b
end

----
We get:
  _gfortran_concat_string (2, str.1, 1, &a, 1, &b);
  _gfortran_copy_string (2, &c, 2, str.1);


We should be able to get:
  _gfortran_concat_string (2, &c, 1, &a, 1, &b);

Instead and get rid of the tempory variable of str.1.


-- 
           Summary: concat of strings create an extra temporary variable
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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



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