From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout3.netcologne.de (cc-smtpout3.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:3]) by sourceware.org (Postfix) with ESMTPS id 9C9D9385AC3C; Sun, 31 Jul 2022 11:01:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C9D9385AC3C Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 471EA122E9; Sun, 31 Jul 2022 13:01:50 +0200 (CEST) Received: from [IPV6:2001:4dd7:dd1e:0:7285:c2ff:fe6c:992d] (2001-4dd7-dd1e-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd7:dd1e:0:7285:c2ff:fe6c:992d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA id F154811DF8; Sun, 31 Jul 2022 13:01:47 +0200 (CEST) Message-ID: <12c633ba-c5c2-bb89-8331-9702411109e1@netcologne.de> Date: Sun, 31 Jul 2022 13:01:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] libfortran: Fix up boz_15.f90 on powerpc64le with -mabi=ieeelongdouble [PR106079] Content-Language: en-US To: Jakub Jelinek , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org References: From: Thomas Koenig In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-NetCologne-Spam: L X-Rspamd-Queue-Id: F154811DF8 X-Spamd-Bar: ---- X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2022 11:01:57 -0000 Hi Jakub, > The boz_15.f90 test FAILs on powerpc64le-linux when -mabi=ieeelongdouble > is used (either default through --with-long-double-format=ieee or > when used explicitly). > The problem is that the read/write transfer routines are called with > BT_REAL (or BT_COMPLEX) type and kind 17 which is magic we use to say > it is the IEEE quad real(kind=16) rather than the IBM double double > real(kind=16). For the floating point input/output we then handle kind > 17 specially, but for B/O/Z we just treat the bytes of the floating point > value as binary blob and using 17 in that case results in unexpected > behavior, for write it means we don't estimate right how many chars we'll > need and print ******************** etc. rather than what we should, and > even with explicit size we'd print one further byte than intended. > For read it would even mean overwriting some unrelated byte after the > floating point object. > > Fixed by using 16 instead of 17 in the read_radix and write_{b,o,z} calls. > > Bootstrapped/regtested on powerpc64le-linux, ok for trunk / 12.2? OK for both. Best regards Thomas