This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, fortran] Patch for PR fortran/39352, using -fexceptions.


This patch for PR fortran/39352 initializes eh_personality_libfunc if
-fexceptions is used.  This is the same initalization that is done in
init_exception_processing (cp/except.c) and in java_init_decl_processing
(java/decl.c)

Tested with no regressions on IA64 HP-UX and Linux.

OK to checkin?

Steve Ellcey
sje@cup.hp.com


2009-05-12  Steve Ellcey  <sje@cup.hp.com>

	PR fortran/39352
	* f95-lang.c (gfc_init): Initialize eh_personality_libfunc.


Index: f95-lang.c
===================================================================
--- f95-lang.c	(revision 147407)
+++ f95-lang.c	(working copy)
@@ -43,6 +43,9 @@ along with GCC; see the file COPYING3.  
 #include "diagnostic.h"
 #include "tree-dump.h"
 #include "cgraph.h"
+#include "libfuncs.h"
+#include "expr.h"
+#include "except.h"
 
 #include "gfortran.h"
 #include "cpp.h"
@@ -269,6 +272,11 @@ gfc_init (void)
   if (gfc_new_file () != SUCCESS)
     fatal_error ("can't open input file: %s", gfc_source_file);
 
+  if (flag_exceptions)
+    eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
+					       ? "__gxx_personality_sj0"
+					       : "__gxx_personality_v0");
+
   return true;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]