This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: "jvdelisle at charter dot net" <jvdelisle at charter dot net>
- Cc: FX Coudert <fxcoudert at gmail dot com>, fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Jul 2016 15:26:23 +0200
- Subject: Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies
- Authentication-results: sourceware.org; auth=none
> > 2016-07-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
> >
> > PR fortran/66310
> > * simplify.c (gfc_simplify_repeat): Set max repeat to huge - 1 to allow
> > one byte for null terminating the resulting string constant.
>
> OK, thanks
Please hold on. I still see several problem with the patch applied. One is
program p
character :: z = 'z'
print *, repeat(z, huge(1)-2**9)
end
a.out(67209,0x7fff77e0b000) malloc: *** mach_vm_map(size=18446744071562067968) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Operating system error: Cannot allocate memory
Memory allocation failure in realloc
on x86_64-apple-darwin15.5 with/without the patch. print *, repeat(z, huge(1)-2**9-1) "works".
I’ll try to report the other problems in the PR later today.
Dominique