From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9550 invoked by alias); 4 Dec 2018 17:04:57 -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 9525 invoked by uid 89); 4 Dec 2018 17:04:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Fritz, fritz, transfer X-HELO: mail-it1-f179.google.com Received: from mail-it1-f179.google.com (HELO mail-it1-f179.google.com) (209.85.166.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Dec 2018 17:04:54 +0000 Received: by mail-it1-f179.google.com with SMTP id a6so15549450itl.4; Tue, 04 Dec 2018 09:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uJHfzAv1hzwC0vUn0u6hKH2KDN0KccMXWwFOWmeTTDA=; b=YdWAQxsTwJvNSRYVFpc0rkuf/Nc5MFEjbzzHkV5i3h/BYKIpxIKvrf0ICORIonuk8f dh8Il/bLgiQNO7eye4Gw1HlLzIrTZWcJn/55CAfDQgH+JTBwvrcAgM45F/K8r9s2P5zA CCUBsvSIO2cXnSpco5YeUGHbcrn+8MIx4SdVl21Uc8QlDRq5ofOFCCuz48eAVS/O4m/5 yvKhQdv95k9brygBxEf02Oyvptghf1jrek7JBAicGcGYT2yaIZ74JD9SlWZOIWvGdztm Xo0ZvnsEz2GWzOwJl0MjcvuCGTi10eSCNoHjrMZCMztK7JdmZ59aP0n0B0pGFIqLIDaJ PHjA== MIME-Version: 1.0 References: <17e10b1f-a4a8-745a-0247-7bddfd90df7f@codethink.co.uk> <20181204151130.GB12380@tucnak> In-Reply-To: <20181204151130.GB12380@tucnak> From: Fritz Reese Date: Tue, 04 Dec 2018 17:04:00 -0000 Message-ID: Subject: Re: [PATCH, Fortran] pad char to int conversions with spaces instead of zeros (legacy) To: Jakub Jelinek Cc: mark.eggleston@codethink.co.uk, fortran , gcc-patches , Jeff Law Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-12/txt/msg00217.txt.bz2 On Tue, Dec 4, 2018 at 10:12 AM Jakub Jelinek wrote: > > Just a couple of random comments. > -fdec-pad-with-spaces option name doesn't look right, because it doesn't say > what the option affects. So perhaps have transfer in the option name? [...] > Wouldn't it be better to allow specifying whatever character you want to pad > with, so that users can choose something even different? I concur with this. In that case some option like -ftransfer-pad-char= may be a more appriopriate name, where -fdec may enable a default transfer-pad-char of \x20 rather than \x00. > > > --- a/gcc/fortran/simplify.c > > +++ b/gcc/fortran/simplify.c > > @@ -7830,7 +7830,7 @@ gfc_simplify_transfer (gfc_expr *source, gfc_expr *mold, gfc_expr *size) [...] > This affects just the simplification when the argument is a known constant. > Shouldn't we handle it also when it is not a constant? Yes. Mark, you'll need to also patch iresolve.c (gfc_resolve_transfer) to affect non-constant resolution. > The tests look too much big-endian vs. little-endian dependent and > ascii dependent. We have pdp-endian and doesn't s390x TPF use EBCDIC? > > Wouldn't it be better to compare transfer("ABCE", 1_8) with transfer("ABCE ", 1_8) Agreed. --- Fritz