This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] Patch for PR fortran/39352, using -fexceptions.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 May 2009 13:07:17 +0200
- Subject: Re: [patch, fortran] Patch for PR fortran/39352, using -fexceptions.
- References: <200905130000.n4D00jq06204@lucas.cup.hp.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 12, 2009 at 05:00:45PM -0700, Steve Ellcey wrote:
> 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)
Which is wrong, fortran programs generally aren't linked against
-lstdc++/-lsupc++ which provides these, and doesn't need
__gxx_personality_*.
You should instead do what the C FE does, particularly only initialize
eh_personality_libfunc if any !$omp constructs are seen (other than !$omp atomic)
(C also does that for __attribute__((cleanup(fn)))) and register the C
personality function (__gcc_personality_*, which is in -lgcc{,_eh,_s}
instead of -lstdc++).
See c_maybe_initialize_eh and where it is called.
Alternatively, fix up ia64 unwind generation so that it doesn't require
a personality function (put 0 in there?).
Jakub