From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116670 invoked by alias); 23 Nov 2017 14:03:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 116650 invoked by uid 89); 23 Nov 2017 14:03:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=IRC, HTo:D*googlemail.com, minloc2s.m4, UD:maxloc2s.m4 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yb0-f169.google.com Received: from mail-yb0-f169.google.com (HELO mail-yb0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Nov 2017 14:03:28 +0000 Received: by mail-yb0-f169.google.com with SMTP id y14so7238271ybi.0; Thu, 23 Nov 2017 06:03:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Ry36AYfiH0m96FjG9Vp0M1ePYFQcY58AmYl4hbN7JCA=; b=Rg4GM7Jd8RRs5tbul0X0xkPnUUPxRQG29yl4AQOR4qyjfVNRpA85lVDHeSVCUOYn7s /cV7wp/5GiWc61uZXhUBzOz0uz6hTm9nM1YRMTneXS/GuaX+tLO4EQH3QsE839dWfgbg bhoOHU7bzR+JNJiAWKRrXSbtnDhIb006KQHG7KlpSe+POwih4ls5ZdS6e06T/92c/W9v Q4zRDJhiU4zyck+jsIrb0ZjTJ6Wioy0b/lsJJo9JjPz+V6iayEQfkTyHtHne1sGXq4fu QqvJRnKVcKD9DZQfC0ByG2UVJN5vNy7ewzJQowBtpBwCqIHg7mLJ2hGR8n+uidJWEZGd lcvw== X-Gm-Message-State: AJaThX4rw8u+hHfr4pF/FIdrII8Wa7FAmof8x3Wz5RmwUa4KZ3k3zvD5 JO7KbJUNJamU0kKkuVgVYYlj1nnaP9tOLbIB30g= X-Google-Smtp-Source: AGs4zMZwg/+qe5cFeST7OFizrHAxl+6JhaNqTGm5gxVUckJqhnJrzYFI6kC2anKlkxJ5fTXc2ywFwXY21Tm6F+fUmsI= X-Received: by 10.37.216.208 with SMTP id p199mr14920487ybg.429.1511445806293; Thu, 23 Nov 2017 06:03:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.163.146 with HTTP; Thu, 23 Nov 2017 06:03:25 -0800 (PST) In-Reply-To: References: <44c7b39b-d849-e31a-7175-80bf1a348908@netcologne.de> <03e85917-b506-0d8b-78b0-263c371cba6a@netcologne.de> <09d35ad1-6883-0372-7a1a-840c8c4b07f9@netcologne.de> <781c7918-5600-c488-0528-0c351ea04442@netcologne.de> From: Janne Blomqvist Date: Thu, 23 Nov 2017 14:10:00 -0000 Message-ID: Subject: Re: [patch, fortran] Implement maxloc and minloc for character To: Ramana Radhakrishnan Cc: Thomas Koenig , "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-11/txt/msg02135.txt.bz2 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 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