[Bug fortran/66310] Problems with intrinsic repeat for large number of copies
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 18 04:34:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66310
--- Comment #24 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to Jerry DeLisle from comment #23)
> Ok I see it.
>
> In fbuf.c (fbuf_alloc):
>
> /* Round up to nearest multiple of the current buffer length. */
> newlen = ((u->fbuf->pos + len) / u->fbuf->len + 1) *u->fbuf->len;
> u->fbuf->buf = xrealloc (u->fbuf->buf, newlen);
> u->fbuf->len = newlen;
>
> We are rounding up to make sure we have enough buffer. The size newlen is
> calculated to 2147484160 which exceeds the limit of 2147483647 and xrealloc
> fails.
There is a 2 GB limit on 32 bit processes, so this is not a bug. I suggest this
be closed.
More information about the Gcc-bugs
mailing list