From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14774 invoked by alias); 13 Feb 2007 06:41:49 -0000 Received: (qmail 14732 invoked by uid 48); 13 Feb 2007 06:41:37 -0000 Date: Tue, 13 Feb 2007 06:41:00 -0000 Message-ID: <20070213064137.14731.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/30780] cpu_time produces a floating point exception when used with -O0 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kargl at gcc dot gnu dot org" 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 X-SW-Source: 2007-02/txt/msg01364.txt.bz2 ------- Comment #6 from kargl at gcc dot gnu dot org 2007-02-13 06:41 ------- (In reply to comment #5) > The exception is occurring in the print statement. Nothing to do with time. > No, there is a "problem" in cpu_time. -ffpe-trap='precision' is trapping on lost precision. On x86_64, long is 64-bit and GFC_REAL_4 is 32-bit with only 24-bits of precision. You can't convert long to GFC_REAL_4 without loss of precision. In short, using this option is probably not a good idea if you have mixed mode math. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30780