This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] Patch for PR fortran/39352, using -fexceptions.
- From: Tobias Burnus <burnus at net-b dot de>
- To: 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 07:52:39 +0200
- Subject: Re: [patch, fortran] Patch for PR fortran/39352, using -fexceptions.
- References: <200905130000.n4D00jq06204@lucas.cup.hp.com>
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)
>
> + if (flag_exceptions)
> + eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
> + ? "__gxx_personality_sj0"
> + : "__gxx_personality_v0");
> +
>
Is this enough or should one do something like C (which like Fortran
does not require exception handling), i.e. setting out the default
unwind and cleanup? The patch looks otherwise reasonable, but maybe it
should be (co)reviewed by someone knowing the middle-end and
understanding the eh_* part of the GCC.
void
c_maybe_initialize_eh (void)
{
if (!flag_exceptions || c_eh_initialized_p)
return;
c_eh_initialized_p = true;
eh_personality_libfunc
= init_one_libfunc (USING_SJLJ_EXCEPTIONS
? "__gcc_personality_sj0"
: "__gcc_personality_v0");
default_init_unwind_resume_libfunc ();
using_eh_for_cleanups ();
}
Tobias