From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 42D6E3844054; Thu, 22 Apr 2021 19:21:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 42D6E3844054 Received: by mail-ej1-x62b.google.com with SMTP id g5so63713351ejx.0; Thu, 22 Apr 2021 12:21:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:cc:from :message-id; bh=8QVCN2A5g9UKkO4i5bO7fh8+FtpjOGTK7gkeiZaAlWI=; b=GKGZVkVj5K77Kx/f5ONVU0nCUOsP6c4DA4etZon3enEDMRdSfzGO1tHKPo1Zah/i74 h2WREz8bkfZ/XMRHTFLqgwsr9y0VJ5fSknZHU+mMfLkO9p8nQ8KgUbbbM3DepVw1cdhg zqRwJMhXsz5aF9tJ/sfAHjyAG4/GqDjpd8qBHyyBXCCORkUufBoh1gxB5WKPz7BEc+3u iQNsKUIigzFWq/t5hHsT8uzHg2rWUWHC5zBXmOnbqVIyF8dHgVw7L5nPbValn9IQsXie mGz/aAOGEMrfsVmdjnRBPo2ZH3cfx9AhedN6U23y5klzFb8EtIvjcYGbmBpgXWVY7uTE QFLg== X-Gm-Message-State: AOAM532fcYH+9Yfdkv9xhsEcBIV1f3MxGpdwJ+aiuN52jfU/orqcF63i wkG7HLTDfJGgduheec6P1wM= X-Google-Smtp-Source: ABdhPJzTn0XnZzterXfjGoEHko+gh0cW51R4AqhXvwtiVs0IEUVFhRVRs3mFlyh/ufnKeV2yIUdDHA== X-Received: by 2002:a17:907:210a:: with SMTP id qn10mr238546ejb.414.1619119316380; Thu, 22 Apr 2021 12:21:56 -0700 (PDT) Received: from [192.168.178.32] (dynamic-077-007-126-021.77.7.pool.telefonica.de. [77.7.126.21]) by smtp.gmail.com with ESMTPSA id bu20sm2464665ejb.76.2021.04.22.12.21.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Apr 2021 12:21:55 -0700 (PDT) Date: Thu, 22 Apr 2021 21:21:54 +0200 User-Agent: K-9 Mail for Android In-Reply-To: <20210422190928.GA32628@ibm-toto.the-meissners.org> References: <20210419185547.GA24449@ibm-toto.the-meissners.org> <20210422190928.GA32628@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Fix Fortran rounding issues, PR fortran/96983. To: Michael Meissner , Tobias Burnus CC: GCC Patches , Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner , Will Schmidt , "fortran@gcc.gnu.org" From: Richard Biener Message-ID: <35ADB85B-35FD-4A85-96A0-4DCF83558A38@gmail.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 19:21:59 -0000 On April 22, 2021 9:09:28 PM GMT+02:00, Michael Meissner wrote: >On Wed, Apr 21, 2021 at 10:10:07AM +0200, Tobias Burnus wrote: >> On 20=2E04=2E21 08:58, Richard Biener via Fortran wrote: >> >On Mon, Apr 19, 2021 at 9:40 PM Michael Meissner via Fortran >> > wrote: >> Is there any reason to not only send the email to fortran@ _and_ >> gcc-patches@ but sending it to 13 Fortran maintainers explicitly? >(Now >> removed) > >Sorry about that=2E With PowerPC backend changes, I generally do >explicitly add >the maintainers so things don't get lost=2E > > >> >>Fix Fortran rounding issues, PR fortran/96983=2E >> >> >> >>Can I check this change into the GCC trunk? >> >The patch looks fine technically and is definitely an improvement >since the >> >intermediate conversion looks odd=2E But it might be that the >standard >> >requires such dance though the preceeding cases handled don't seem >to >> >care=2E I'm thinking of a FP format where round(1=2E6) =3D=3D 3 becau= se of >lack >> >of precision but using an intermediate FP format with higher >precision >> >would "correctly" compute 2=2E >>=20 >> The patched build_round_expr is only called by ANINT / NINT; >> NINT is real =E2=86=92 integer; ANINT is real =E2=86=92 real >> [And the modified code is only called for NINT, reason: see comment >far below=2E] >>=20 >> NINT (A[, KIND]) is described (F2018) as "Nearest integer": >> * Result Characteristics=2E Integer=2E If KIND is present, the kind typ= e >parameter >> is that specified by the value of KIND; >> otherwise, the kind type parameter is that of default integer type=2E >> * The result is the integer nearest A, or if there are two >> integers equally near A, the result is whichever such integer has >the greater >> magnitude=2E >> * Example=2E NINT (2=2E783) has the value 3=2E >>=20 >> ANINT (A[, KIND]) as "Nearest whole number": >> * The result is of type real=2E If KIND is present, the kind type >parameter is that >> specified by the value of KIND; otherwise, the kind type parameter >is that of A=2E >> * The result is the integer nearest A, or if there are two integers >equally near A, >> the result is whichever such integer has the greater magnitude=2E >> * Examples=2E ANINT (2=2E783) has the value 3=2E0=2E ANINT (=E2=88=922= =2E783) has the >value =E2=88=923=2E0=2E >>=20 >> >Of course the current code doesn't handle this correctly for the >> >case if llroundf either=2E >> >>I've not contributed to the Fortran front end before=2E If the >maintainers like >> >>the patch, can somebody point out if I need to do additional things >to commit >> >>the patch? >> Nothing special: a testcase already exists, committing is done as >usual >> and a PR to update you have as well=2E > >Given GCC 11 has branched, is it ok to backport the patch to the GCC 11 >branch >as well? I assume it is, since it fixes a regression in the compiler=2E Please wait until after 11=2E1 is released=2E=20 Thanks,=20 Richard=2E=20