public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janne Blomqvist <blomqvist.janne@gmail.com>
To: Ramana Radhakrishnan <ramana.gcc@googlemail.com>
Cc: Thomas Koenig <tkoenig@netcologne.de>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
		gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran] Implement maxloc and minloc for character
Date: Thu, 23 Nov 2017 14:10:00 -0000	[thread overview]
Message-ID: <CAO9iq9HFpNp6g3jkTetJAHMn7kFbBShfOq0Fn1mOvXYVirKdUw@mail.gmail.com> (raw)
In-Reply-To: <CAJA7tRbJ8d2sMjQ+D2Q=VXnT9uLLhVZTR=6pYiKdB3-Kqh-Ryg@mail.gmail.com>

On Thu, Nov 23, 2017 at 3:58 PM, Ramana Radhakrishnan
<ramana.gcc@googlemail.com> wrote:
> On Thu, Nov 23, 2017 at 1:53 PM, Janne Blomqvist
> <blomqvist.janne@gmail.com> wrote:
>> On Thu, Nov 23, 2017 at 2:56 PM, Janne Blomqvist
>> <blomqvist.janne@gmail.com> wrote:
>>> On Wed, Nov 22, 2017 at 8:10 PM, Thomas Koenig <tkoenig@netcologne.de> 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 are still some files which mention Fortran 95, that can be fixed
>>>> later.
>>>
>>> That's ok, I wasn't expecting you to fix all such occurences, just the
>>> new files you added.
>>>
>>> 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-approved. Thanks!
>>
>> To continue, the prototypes are inconsistent too, e.g. m4/minloc2s.m4:
>>
>> extern 'rtype_name` 'name`'rtype_qual`_'atype_code` ('atype` * const
>> restrict, int);
>> export_proto('name`'rtype_qual`_'atype_code`);
>>
>> 'rtype_name`
>> 'name`'rtype_qual`_'atype_code` ('atype` * const restrict array,
>> gfc_charlen_type len)
>>
>> See also lines 77/82, and in maxloc2s.m4 lines 42/46 and 144/149.
>>
>> Thanks to James and Ramana on IRC, who are working on some target
>> where gfc_charlen_type != int and reported build failures.
>
>
> I'm not sure why gfc_charlen_type != int on arm-none-eabi and
> aarch64-none-elf which is where both James and I saw the issue.
>
> The issue hasn't appeared on any of our cross-linux builds.

gfc_charlen_type is typedeffed to a GFC_INTEGER_4, which comes from
kinds.h generated during the library build time (see
libgfortran/mk-kinds-h.sh). At least on x86_64-pc-linux-gnu this is
then a int32_t which is a typedef for plain int. HTH.



-- 
Janne Blomqvist

  reply	other threads:[~2017-11-23 14:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-19 22:04 Thomas Koenig
2017-11-20  8:41 ` Janne Blomqvist
2017-11-20 18:33   ` Thomas Koenig
2017-11-21 16:25     ` Janne Blomqvist
2017-11-21 19:53       ` Thomas Koenig
2017-11-21 20:47         ` Janne Blomqvist
2017-11-22 18:16           ` Thomas Koenig
2017-11-23 13:25             ` Janne Blomqvist
2017-11-23 14:03               ` Janne Blomqvist
2017-11-23 14:06                 ` Ramana Radhakrishnan
2017-11-23 14:10                   ` Janne Blomqvist [this message]
2017-11-23 18:40               ` Thomas Koenig
2017-11-24  9:33                 ` Janne Blomqvist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAO9iq9HFpNp6g3jkTetJAHMn7kFbBShfOq0Fn1mOvXYVirKdUw@mail.gmail.com \
    --to=blomqvist.janne@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ramana.gcc@googlemail.com \
    --cc=tkoenig@netcologne.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).