Index: gcc/fortran/gfortran.h
===================================================================
--- gcc/fortran/gfortran.h	(revision 194387)
+++ gcc/fortran/gfortran.h	(working copy)
@@ -496,6 +496,7 @@ enum gfc_isym_id
   GFC_ISYM_SHIFTA,
   GFC_ISYM_SHIFTL,
   GFC_ISYM_SHIFTR,
+  GFC_ISYM_SHOW_BACKTRACE,
   GFC_ISYM_SIGN,
   GFC_ISYM_SIGNAL,
   GFC_ISYM_SI_KIND,
Index: gcc/fortran/intrinsic.c
===================================================================
--- gcc/fortran/intrinsic.c	(revision 194387)
+++ gcc/fortran/intrinsic.c	(working copy)
@@ -3134,6 +3134,8 @@ add_subroutines (void)
 	      p2, BT_CHARACTER, dc, REQUIRED, INTENT_IN,
 	      st, BT_INTEGER, di, OPTIONAL, INTENT_OUT);
 
+  add_sym_0s ("show_backtrace", GFC_ISYM_SHOW_BACKTRACE, GFC_STD_GNU, NULL);
+
   add_sym_1s ("sleep", GFC_ISYM_SLEEP, CLASS_IMPURE, BT_UNKNOWN, 0, GFC_STD_GNU,
 	      gfc_check_sleep_sub, NULL, gfc_resolve_sleep_sub,
 	      sec, BT_INTEGER, di, REQUIRED, INTENT_IN);
Index: gcc/fortran/intrinsic.texi
===================================================================
--- gcc/fortran/intrinsic.texi	(revision 194387)
+++ gcc/fortran/intrinsic.texi	(working copy)
@@ -259,6 +259,7 @@ Some basic guidelines for editing this document:
 * @code{SHIFTA}:        SHIFTA,    Right shift with fill
 * @code{SHIFTL}:        SHIFTL,    Left shift
 * @code{SHIFTR}:        SHIFTR,    Right shift
+* @code{SHOW_BACKTRACE}: SHOW_BACKTRACE, Show a backtrace
 * @code{SIGN}:          SIGN,      Sign copying function
 * @code{SIGNAL}:        SIGNAL,    Signal handling subroutine (or function)
 * @code{SIN}:           SIN,       Sine function
@@ -349,6 +350,7 @@ the applicable standard for each intrinsic procedu
 @item @emph{Description}:
 @code{ABORT} causes immediate termination of the program.  On operating
 systems that support a core dump, @code{ABORT} will produce a core dump.
+It will also print a backtrace, unless @code{-fno-backtrace} is given.
 
 @item @emph{Standard}:
 GNU extension
@@ -371,7 +373,7 @@ end program test_abort
 @end smallexample
 
 @item @emph{See also}:
-@ref{EXIT}, @ref{KILL}
+@ref{EXIT}, @ref{KILL}, @ref{SHOW_BACKTRACE}
 
 @end table
 
@@ -11180,6 +11182,34 @@ The return value is of type @code{INTEGER} and of
 
 
 
+@node SHOW_BACKTRACE
+@section @code{SHOW_BACKTRACE} --- Show a backtrace
+@fnindex SHOW_BACKTRACE
+@cindex backtrace
+
+@table @asis
+@item @emph{Description}:
+@code{SHOW_BACKTRACE} shows a backtrace at an arbitrary place in user code.
+Program execution continues normally afterwards.
+
+@item @emph{Standard}:
+GNU Extension
+
+@item @emph{Class}:
+Subroutine
+
+@item @emph{Syntax}:
+@code{CALL SHOW_BACKTRACE}
+
+@item @emph{Arguments}:
+None
+
+@item @emph{See also}:
+@ref{ABORT}
+@end table
+
+
+
 @node SIGN
 @section @code{SIGN} --- Sign copying function
 @fnindex SIGN
Index: libgfortran/gfortran.map
===================================================================
--- libgfortran/gfortran.map	(revision 194387)
+++ libgfortran/gfortran.map	(working copy)
@@ -1192,6 +1192,7 @@ GFORTRAN_1.4 {
 GFORTRAN_1.5 {
   global:
     _gfortran_ftell2;
+    _gfortran_show_backtrace;
 } GFORTRAN_1.4; 
 
 F2C_1.0 {
Index: libgfortran/libgfortran.h
===================================================================
--- libgfortran/libgfortran.h	(revision 194387)
+++ libgfortran/libgfortran.h	(working copy)
@@ -668,7 +668,7 @@ internal_proto(find_addr2line);
 /* backtrace.c */
 
 extern void show_backtrace (void);
-internal_proto(show_backtrace);
+iexport_proto(show_backtrace);
 
 /* error.c */
 
Index: libgfortran/runtime/backtrace.c
===================================================================
--- libgfortran/runtime/backtrace.c	(revision 194387)
+++ libgfortran/runtime/backtrace.c	(working copy)
@@ -277,3 +277,4 @@ fallback_noerr:
   state.direct_output = 1;
   _Unwind_Backtrace (trace_function, &state);
 }
+iexport(show_backtrace);
