This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran, patch] Allow displaying backtraces from user code
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: FX <fxcoudert at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 Mar 2012 07:41:45 -0800
- Subject: Re: [fortran, patch] Allow displaying backtraces from user code
- References: <61B50068-0CDB-48AF-95D8-1139D6283FF8@gmail.com>
On Sat, Mar 03, 2012 at 08:44:56AM +0100, FX wrote:
> PR 36044 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36044) is an enhancement request for a way to display backtraces from user code. I'm against adding yet another nonstandard intrinsic for this purpose (which is how Intel Fortran does it), but I would like to offer the following solution to the issue, as I think it can be useful in some cases (and the way I suggest should not be a maintainance burden for us):
>
> -- export _gfortran_show_backtrace() from libgfortran (instead of it being an internal function)
> -- add documentation on how to call this function from user-code using BIND(C)
>
> Patch was bootstrapped and regtested on x86_64-apple-darwin11, also tested with "make info html pdf". OK for trunk?
> FX
>
>
I think that this approach is a mistake. The patch
starts us down a slippery slope. Why not export all
the nonstandard intrinsics? In additions, the
_gfortran_ prefix was used to separate the libgfortran
namespace from userspace. Providing a means to
circumvent this separation seems to asking for more
PR.
I would rather see a new intrinsic procedure add to
gfortran. The standard does not prevent a vendor
from offer additional intrinsic procedures not found
in the standard.
--
Steve