This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25714] New: concat of strings create an extra temporary variable
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2006 03:12:40 -0000
- Subject: [Bug fortran/25714] New: concat of strings create an extra temporary variable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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