This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66310] Problems with intrinsic repeat for large number of copies
- From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 May 2015 01:32:23 +0000
- Subject: [Bug fortran/66310] Problems with intrinsic repeat for large number of copies
- Auto-submitted: auto-generated
- References: <bug-66310-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66310
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I do not think this is a bug. First the function repeat is evaluated and the
result must allocate a large amount of memory to hold the constant "zzzzz....".
Then when writing the constant out, a buffer is created which requires another
allocation, and finally since this is formatted output, though list directed,
the routines have to account for things like positioning of the formatted
result and thus we have another buffer to support all the unanticipated things
that may have to be done to the output. The fbuf is dynamically sized as
needed and in this case gets large also.
So there is a practical limit you are hitting with this obscure case. I would
lean toward a don't fix on this one. Putting it another way, why should we
develop special code just to handle this case? Yes we could turn it into a big
do loop rather than a large constant, it's just not worth the effort.