Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-21 Thread Steve Kargl
On Sun, Jan 21, 2018 at 09:49:47PM +0200, Janne Blomqvist wrote: > On Sun, Jan 21, 2018 at 8:30 PM, Steve Kargl > wrote: > > On Sun, Jan 21, 2018 at 01:11:28PM +0200, Janne Blomqvist wrote: > >> PING > >> > > > > Janne, > > > > I didn't see anything wrong with the patch. Other than Dominiq's > >

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-21 Thread Janne Blomqvist
On Sun, Jan 21, 2018 at 8:30 PM, Steve Kargl wrote: > On Sun, Jan 21, 2018 at 01:11:28PM +0200, Janne Blomqvist wrote: >> PING >> > > Janne, > > I didn't see anything wrong with the patch. Other than Dominiq's > concerns about slow downs with -m32, I think it is fine. Thanks, I guess that's an O

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-21 Thread Steve Kargl
On Sun, Jan 21, 2018 at 01:11:28PM +0200, Janne Blomqvist wrote: > PING > Janne, I didn't see anything wrong with the patch. Other than Dominiq's concerns about slow downs with -m32, I think it is fine. I do wonder why you use gfc_charlen_t in some place and HOST_WIDE_INT in other places as g

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-21 Thread Dominique d'Humières
I use x86_64-apple-darwin17 and I run the test with -m32. Without the patch, a plain compilation leads to four errors and a timing 0.011u 0.008s 0:00.02 50.0% 0+0k 0+0io 13pf+0w With the patch I get the four errors plus "Result of LEN overflows its kind » and a timing much slower 12.454u 2

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-21 Thread Janne Blomqvist
PING On Sun, Jan 14, 2018 at 2:33 PM, Janne Blomqvist wrote: > On Sun, Jan 14, 2018 at 12:45 PM, Janne Blomqvist > wrote: >> On Sat, Jan 13, 2018 at 7:35 PM, Dominique d'Humières >> wrote: >>> I have finally bootstrapped gfortran with the two patches applied and the >>> spurious warnings with

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-14 Thread Janne Blomqvist
On Sun, Jan 14, 2018 at 12:45 PM, Janne Blomqvist wrote: > On Sat, Jan 13, 2018 at 7:35 PM, Dominique d'Humières > wrote: >> I have finally bootstrapped gfortran with the two patches applied and the >> spurious warnings with -Wall are now gone (limited testing), but I see a >> regression for gf

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-14 Thread Thomas Koenig
Am 14.01.2018 um 11:45 schrieb Janne Blomqvist: I have tried to use %wp, but it didn’t work: ../../work/gcc/fortran/decl.c: In function 'void gfc_set_constant_character_len(gfc_charlen_t, gfc_expr*, gfc_charlen_t)': ../../work/gcc/fortran/decl.c:1567:5: error: unknown conversion type character

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-14 Thread Janne Blomqvist
On Sat, Jan 13, 2018 at 7:35 PM, Dominique d'Humières wrote: > I have finally bootstrapped gfortran with the two patches applied and the > spurious warnings with -Wall are now gone (limited testing), but I see a > regression for gfortran.dg/string_1.f90 due to an additional error > > /opt/gcc/_c

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-13 Thread Dominique d'Humières
I have finally bootstrapped gfortran with the two patches applied and the spurious warnings with -Wall are now gone (limited testing), but I see a regression for gfortran.dg/string_1.f90 due to an additional error /opt/gcc/_clean/gcc/testsuite/gfortran.dg/string_1.f90:13:15: print *, len(s)

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Janne Blomqvist wrote: > (I don't know why HOST_WIDE_INT_PRINT_DEC doesn't work with the > diagnostics machinery on darwin, but IMHO at this point it's too late HOST_WIDE_INT_PRINT_DEC is a host-specific printf format; for example, it might use %I64d on Windows host or %lld

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-12 Thread Janne Blomqvist
On Wed, Jan 10, 2018 at 3:35 PM, Dominique d'Humières wrote: > Hi Janne, > > With this patch, bootstrap fails with > > ../../work/gcc/fortran/array.c: In function 'bool > gfc_resolve_character_array_constructor(gfc_expr*)': > ../../work/gcc/fortran/array.c:2062:36: error: unknown conversion type

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-10 Thread Dominique d'Humières
Hi Janne, With this patch, bootstrap fails with ../../work/gcc/fortran/array.c: In function 'bool gfc_resolve_character_array_constructor(gfc_expr*)': ../../work/gcc/fortran/array.c:2062:36: error: unknown conversion type character 'l' in format [-Werror=format=] current_length, &p->expr->

[PATCH] PR 78534, 83704 Large character lengths

2018-01-09 Thread Janne Blomqvist
This patch fixes various parts of the code to use a larger type than int for the character length. Depending on the situation, HOST_WIDE_INT, size_t, or gfc_charlen_t is appropriate. Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu, Ok for trunk? gcc/fortran/ChangeLog: 2018-01-09 Janne Bl