Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-24 Thread Janne Blomqvist
On Thu, Nov 23, 2017 at 7:58 PM, Thomas Koenig wrote: > Hi Janne, > >> However, to continue my nitpicking (sorry!), it seems that in many >> cases compare_fcn still takes an integer length argument. Could you >> make that gfc_charlen_type as well? Or maybe size_t, since the >> argument is passed s

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-23 Thread Thomas Koenig
Hi Janne, However, to continue my nitpicking (sorry!), it seems that in many cases compare_fcn still takes an integer length argument. Could you make that gfc_charlen_type as well? Or maybe size_t, since the argument is passed straight to memcmp{_char4} anyway? Please consider such a patch pre-a

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-23 Thread Janne Blomqvist
On Thu, Nov 23, 2017 at 3:58 PM, Ramana Radhakrishnan wrote: > On Thu, Nov 23, 2017 at 1:53 PM, Janne Blomqvist > wrote: >> On Thu, Nov 23, 2017 at 2:56 PM, Janne Blomqvist >> wrote: >>> On Wed, Nov 22, 2017 at 8:10 PM, Thomas Koenig >>> wrote: Hi Janne, >> So, attached is a new

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-23 Thread Ramana Radhakrishnan
On Thu, Nov 23, 2017 at 1:53 PM, Janne Blomqvist wrote: > On Thu, Nov 23, 2017 at 2:56 PM, Janne Blomqvist > wrote: >> On Wed, Nov 22, 2017 at 8:10 PM, Thomas Koenig wrote: >>> Hi Janne, >>> > So, attached is a new version of the patch. No update > on the ChangeLog. OK for trunk? >>

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-23 Thread Janne Blomqvist
On Thu, Nov 23, 2017 at 2:56 PM, Janne Blomqvist wrote: > On Wed, Nov 22, 2017 at 8:10 PM, Thomas Koenig wrote: >> Hi Janne, >> So, attached is a new version of the patch. No update on the ChangeLog. OK for trunk? >>> >>> Yup, just really fix the copyright and string length stuff first.

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-23 Thread Janne Blomqvist
On Wed, Nov 22, 2017 at 8:10 PM, Thomas Koenig wrote: > Hi Janne, > >>> So, attached is a new version of the patch. No update >>> on the ChangeLog. OK for trunk? >> >> Yup, just really fix the copyright and string length stuff first. Thanks! > > > Committed as rev 255070 with the fixes. > > There

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-22 Thread Thomas Koenig
Hi Janne, So, attached is a new version of the patch. No update on the ChangeLog. OK for trunk? Yup, just really fix the copyright and string length stuff first. Thanks! Committed as rev 255070 with the fixes. There are still some files which mention Fortran 95, that can be fixed later. Tha

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-21 Thread Janne Blomqvist
On Tue, Nov 21, 2017 at 9:50 PM, Thomas Koenig wrote: > Hi Janne, > > >>> So, any other comments about my patch? OK for trunk? >> >> >> - In many cases the copyright notice has "This file is part of the GNU >> Fortran 95 runtime library (libgfortran)." It's a while since we've >> called ourselves

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-21 Thread Thomas Koenig
Hi Janne, So, any other comments about my patch? OK for trunk? - In many cases the copyright notice has "This file is part of the GNU Fortran 95 runtime library (libgfortran)." It's a while since we've called ourselves "GNU Fortran 95", so just remove the "95". That's what I got for copying

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-21 Thread Janne Blomqvist
On Mon, Nov 20, 2017 at 8:29 PM, Thomas Koenig wrote: > Am 20.11.2017 um 09:30 schrieb Janne Blomqvist: >> >> On Sun, Nov 19, 2017 at 11:11 PM, Thomas Koenig >> wrote: >>> >>> There is one question regarding the ABI. Apparently, the string length >>> is passed as an int even on a 64-bit system. I

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-20 Thread Thomas Koenig
Am 20.11.2017 um 09:30 schrieb Janne Blomqvist: On Sun, Nov 19, 2017 at 11:11 PM, Thomas Koenig wrote: There is one question regarding the ABI. Apparently, the string length is passed as an int even on a 64-bit system. I verified that this is indeed the case by doing the actual work on a powerp

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-20 Thread Janne Blomqvist
On Sun, Nov 19, 2017 at 11:11 PM, Thomas Koenig wrote: > There is one question regarding the ABI. Apparently, the string length > is passed as an int even on a 64-bit system. I verified that this > is indeed the case by doing the actual work on a > powerpc64-unknown-linux-gnu box (gcc110 on the gc

[patch, fortran] Implement maxloc and minloc for character

2017-11-19 Thread Thomas Koenig
Hello world, the attached patch implements maxloc and minloc, a missing feature / bug (now that we are shooting for f2003 compliance). I decided to do everything on the library side, since I am more familiar with that territory. I also suspect that any performance gain from inlining will be less