From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6797 invoked by alias); 24 Aug 2014 11:29:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6749 invoked by uid 48); 24 Aug 2014 11:29:48 -0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/62245] gfortran miscompiles int() on mips Date: Sun, 24 Aug 2014 11:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: UNCONFIRMED 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: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01639.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62245 Joost VandeVondele changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Joost.VandeVondele at mat dot ethz | |.ch --- Comment #1 from Joost VandeVondele --- well, the docs as well as the standard assume there that all numbers are representable. Note that some compilers (ifort) won't even read -1e99 in a real, as this exceeds the range of the real, and abort at the read statement. The behavior on x86 is just following what the hardware does, for example CVTTSS2SI, and will yield : If a converted result is larger than the maximum signed doubleword integer, the floating-point invalid exception is raised, and if this exception is masked, the indefinite integer value (80000000H) is returned.