From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27170 invoked by alias); 14 Apr 2013 20:09:05 -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 27092 invoked by uid 48); 14 Apr 2013 20:09:01 -0000 From: "quantheory at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/29383] Fortran 2003/F95[TR15580:1999]: Floating point exception (IEEE) support Date: Sun, 14 Apr 2013 20:09: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-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: quantheory at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01412.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29383 --- Comment #11 from Sean Santos 2013-04-14 20:08:59 UTC --- I'm doing a bit of research because I'm considering trying to tackle part of this soon. I believe that the Fortran standard does not require the rounding mode to apply to operations performed during constant folding, so point 4 above is moot. Please see the collected interpretations of F2003: http://j3-fortran.org/doc/standing/links/016.txt Particularly see F03/0040 and F03/0078. In combination they guarantee that the compiler is allowed to transform expressions at compile time according to the "mathematical equivalence" rule regardless of the rounding mode. In any case, the rounding mode cannot always be established at compile time; if the committee had not decided upon this behavior, then constant folding would often be impossible, period. The Fortran 2003 and 2008 standards also give examples where constant folding and propagation are allowed to influence whether or not an IEEE exception is signaled.