From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69CA93858D35; Sun, 19 Jul 2020 20:50:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69CA93858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595191812; bh=8oPuhu+36jIPO4bd943b/FVO+8gymx6oVkATRK1aPNE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HUHn1TPSB9+LiwC5ErxSWbZ0oA2xk+pZh+yQm8cZFkI63dzJ7Pl9Fv4ElFblvSPnT o5sdnb70EQGMjMU+RnJEcA1ny6snni4ZrSfU+bZhK5EMiH7fLLH0MtjqT+BQA4r8PZ G+KGJnXT+9mSj5R9cWDSUPwF4Og9945brONLBt6Y= From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/93592] Invalid UP/DOWN rounding with EN descriptor Date: Sun, 19 Jul 2020 20:50:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 9.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2020 20:50:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93592 --- Comment #2 from Dominique d'Humieres --- --- ../_clean/libgfortran/io/write_float.def 2020-06-13 03:11:55.0000000= 00 +0200 +++ libgfortran/io/write_float.def 2020-07-19 22:46:57.000000000 +0200 @@ -399,7 +399,7 @@ build_float_string (st_parameter_dt *dtp updown: rchar =3D '0'; - if (ft !=3D FMT_F && w > 0 && d =3D=3D 0 && p =3D=3D 0) + if (ft !=3D FMT_F && ft !=3DFMT_EN && w > 0 && d =3D=3D 0 && p =3D=3D 0) nbefore =3D 1; /* Scan for trailing zeros to see if we really need to round it. */ for(i =3D nbefore + nafter; i < ndigits; i++) should do the trick. I am currently try to reuse gfortran.dg/fmt_en.f90 for= a more general testing.=