From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16419 invoked by alias); 17 Nov 2011 20:04:39 -0000 Received: (qmail 16406 invoked by uid 22791); 17 Nov 2011 20:04:36 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BG X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Nov 2011 20:04:22 +0000 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/51197] [4.7 Regression] Backtrace information less useful Date: Thu, 17 Nov 2011 20:25: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: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC 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 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: 2011-11/txt/msg01799.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51197 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org 2011-11-17 20:04:07 UTC --- (In reply to comment #0) > Hi, > > the backtrace facility is less useful with 4.7 than with 4.6. > > Example: > > program backtrace > implicit none > print *, foo (0.0) > contains > function foo (x) > real, intent (in) :: x > real :: foo > foo = 1 / x > end function foo > end program backtrace > > > gfortran 4.7 (svn revision 181390, arch is i686-pc-linux-gnu): > > % /opt/gcc/4.7/bin/gfortran -g -fbacktrace gfcbug113.f90 > -ffpe-trap=zero,overflow,invalid -static-libgfortran > % ./a.out > > A fatal error occurred! Backtrace for this error: > #0 0x80588BF in _gfortrani_show_backtrace at backtrace.c:261 > #1 0x80494B7 in _gfortrani_backtrace_handler at compile_options.c:46 > #2 0xFFFFE3FF > #3 0x80493B3 in foo at gfcbug113.f90:8 > #4 0x804940B in backtrace at gfcbug113.f90:3 > Floating point exception (core dumped) > > > With gfortran 4.6: > > Program received signal 8 (SIGFPE): Floating-point exception. > > Backtrace for this error: > + [0xffffe400] > + function foo (0x80494B3) > at line 8 of file gfcbug113.f90 > + function backtrace (0x804950C) > at line 3 of file gfcbug113.f90 > + /lib/libc.so.6(__libc_start_main+0xe5) [0xb7641705] > > > Same for SIGSEGV etc. It would be nice if I got back > the old behaviour where the actual error is displayed. > I'm not always good at guessing... > What exactly do you want? In 4.7, the last line of the backtrace is "Floating point exception (core dumped)". That matches the first line from 4.6 "Program received signal 8 (SIGFPE): Floating-point exception." In 4.7, the line #3 0x80493B3 in foo at gfcbug113.f90:8 contains all of the information from 4.6 + function foo (0x80494B3) at line 8 of file gfcbug113.f90 -- steve