From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40438 invoked by alias); 31 Aug 2015 16:55:08 -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 40386 invoked by uid 48); 31 Aug 2015 16:55:04 -0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53379] [4.9/5/6 Regression] No backtrace generated for array bounds violation Date: Mon, 31 Aug 2015 16:55: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.7.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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/msg02153.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53379 --- Comment #21 from Joost VandeVondele --- (In reply to Janne Blomqvist from comment #11) > Looking at the frontend, calls to runtime_error_at are generated from > gfc_trans_runtime_check() and gfc_trans_runtime_error(). I went through > calls to these functions, and IMHO they all look like serious errors worthy > of a backtrace, with the exception of ALLOCATE/DEALLOCATE failures when > STAT= is not specified. In that case F2008 specifies that the processor must > proceed with error termination, and printing a backtrace for this case would > be a bit inconsistent with other cases of error termination. actually, I just created PR67414 where I ask for a backtrace on a failed allocate if stat is not specified. Since it is mostly a 'taste' issue when to emit a backtrace or not, I think it makes sense to just make it an option flag, either never or always emit a backtrace. The flag '-fbacktrace' already exists and it could imply generate a backtrace on every 'error termination', run time error, or deadly signals. I would find that very useful.