Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-19 Thread Dominique d'Humières
> Le 18 juil. 2016 à 02:02, Jerry DeLisle a écrit : > > Please test this revised patch. See my comments in the PR. > > I think we should commit this one. > > Jerry Jerry, As said on IRC I think the limit should be documented and a TODO comment added to gcc/fortran/gfortran.h. While trying

Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-17 Thread Jerry DeLisle
On 07/12/2016 06:26 AM, Dominique d'Humières wrote: >>> 2016-07-11 Jerry DeLisle >>> >>> 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

Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-12 Thread William Clodius
A minor question. Why with Fortran’s counted strings are you appending a null character? > On Jul 11, 2016, at 6:54 PM, Jerry DeLisle wrote: > > Attached patch sets a limit of huge-1 on the character count to avoid the > integer wrap. > > Regression tested with adjustment to test case. > > OK

Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-12 Thread Jerry DeLisle
On 07/12/2016 06:26 AM, Dominique d'Humières wrote: >>> 2016-07-11 Jerry DeLisle >>> >>> 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

Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-12 Thread Dominique d'Humières
> > 2016-07-11 Jerry DeLisle > > > > 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 i

Re: [patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-12 Thread FX
> 2016-07-11 Jerry DeLisle > > 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

[patch, fortran] PR66310 Problems with intrinsic repeat for large number of copies

2016-07-11 Thread Jerry DeLisle
Attached patch sets a limit of huge-1 on the character count to avoid the integer wrap. Regression tested with adjustment to test case. OK for trunk? Regards, Jerry 2016-07-11 Jerry DeLisle PR fortran/66310 * simplify.c (gfc_simplify_repeat): Set max repeat to huge - 1 to a