From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118523 invoked by alias); 5 Jul 2015 18:52:44 -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 118472 invoked by uid 48); 5 Jul 2015 18:52:39 -0000 From: "anlauf at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/63930] libgfortran should use 'abort ()' instead of 'exit (2)' for run-time errors Date: Sun, 05 Jul 2015 18:52:00 -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: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: anlauf at gmx dot de X-Bugzilla-Status: WAITING 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: 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: 2015-07/txt/msg00369.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63930 Harald Anlauf changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gmx dot de --- Comment #2 from Harald Anlauf --- I think that there is a fundamental need to rewrite the handling of runtime errors in gfortran. Since 4.7 I do often not get useful backtraces with certain kinds of fatal errors like array-bounds violation, see PR/53739. I use the patch I suggested there in my private installations, but this doesn't help my colleagues at work. I think a fatal runtime error does not require a nice termination of the program, including closing of files etc. However, this might require a general review - and classification - of runtime errors: - fatal (illegal operations like bad pointers/addresses etc.) - severe (e.g. failed ALLOCATE?) - soft (e.g. "file not found" in an OPEN statement) I'm not sure where I'd place floating point exceptions; their severity might even be configurable. (Note: I'm writing this as nobody seems to care about PR/53739).