From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75664 invoked by alias); 16 Aug 2015 15:27:04 -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 75610 invoked by uid 48); 16 Aug 2015 15:26:58 -0000 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/57496] I/O: WRITE(*,*) HUGE(0._10) gives SIGFPE with -ffpe-trap=overflow Date: Sun, 16 Aug 2015 15:27: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.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fxcoudert at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to 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: 2015-08/txt/msg01054.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57496 Francois-Xavier Coudert changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org, | |fxcoudert at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |fxcoudert at gcc dot gnu.org --- Comment #6 from Francois-Xavier Coudert --- On x86_64-apple-darwin14, I can confirm this occurs on 5.2.0 but appears to have been fixed on trunk. Also, I don't understand how Tobias' patch worked, because in libgfortran.h we have for a long time redefined all the type-generic floating-point macros in terms of "safe to use" GCC builtins: /* The C99 classification macros isfinite, isinf, isnan, isnormal and signbit are broken or inconsistent on quite a few targets. So, we use GCC's builtins instead. Another advantage for GCC's builtins for these type-generic macros is that it handles floating-point types that the system headers may not support (like __float128). */ #undef isnan #define isnan(x) __builtin_isnan(x) #undef isfinite #define isfinite(x) __builtin_isfinite(x) #undef isinf #define isinf(x) __builtin_isinf(x) #undef isnormal #define isnormal(x) __builtin_isnormal(x) #undef signbit #define signbit(x) __builtin_signbit(x)