This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31304] REPEAT argument NCOPIES is not converted as it should
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Mar 2007 11:29:22 -0000
- Subject: [Bug fortran/31304] REPEAT argument NCOPIES is not converted as it should
- References: <bug-31304-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-03-31 12:29 -------
Created an attachment (id=13307)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13307&action=view)
Patch that fixes the PR and a few related issues
This patch fixes both the simplification routine and the code generation. It
removes the need for the libgfortran string_repeat function by emitting inline
calls to memmove(), which probably allows greater optimization.
I added checking on too large values of the NCOPIES argument: NCOPIES has to be
such that the destination length fits in the character length integer kind
(which is for now hardcoded as kind=4, but I hope we can change that someday).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31304