From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78424 invoked by alias); 12 Dec 2018 12:06:20 -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 78322 invoked by uid 89); 12 Dec 2018 12:06:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00,KAM_COUK,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=H*Ad:D*co.uk, privacy.html, wwwcodethinkcouk, privacyhtml X-HELO: imap1.codethink.co.uk Received: from imap1.codethink.co.uk (HELO imap1.codethink.co.uk) (176.9.8.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Dec 2018 12:06:15 +0000 Received: from office.codethink.co.uk ([148.252.241.226] helo=[10.35.5.172]) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1gX3HJ-0006o6-E2; Wed, 12 Dec 2018 12:06:13 +0000 Subject: Re: [PATCH, Fortran] pad char to int conversions with spaces instead of zeros (legacy) To: Jakub Jelinek Cc: Fritz Reese , fortran , gcc-patches References: <17e10b1f-a4a8-745a-0247-7bddfd90df7f@codethink.co.uk> <20181204151130.GB12380@tucnak> <642cbe8d-d03f-3582-e830-84dba6330ee0@codethink.co.uk> <20181210171229.GD12380@tucnak> <46245285-8d0c-e467-6c2a-937a07bbc79d@codethink.co.uk> <20181212115257.GH12380@tucnak> From: Mark Eggleston Message-ID: Date: Wed, 12 Dec 2018 12:06:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181212115257.GH12380@tucnak> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-12/txt/msg00804.txt.bz2 On 12/12/2018 11:52, Jakub Jelinek wrote: > What about: > integer(kind=2) :: a > a = -1 > print *, transfer (1_2, 1_8), transfer (a, 1_8) > end > ? I assume you meant transfer (-1_2, 1_8), the result from gfortran is 65535 for both transfers. I'm about to build the compiler with   memset (buffer, 0x20, buffer_size); instead of   memset (buffer, (flag_dec_pad_with_spaces ? 0x20 : 0x0), buffer_size); and will check again, if necessary a padding variable can be used instead initially set to zero and changed to 0x20 when it is known that the source is character. Marl -- https://www.codethink.co.uk/privacy.html