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/66310] Problems with intrinsic repeat for large number of copies


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.


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