From: Richard Henderson <rth@redhat.com>
To: Richard Guenther <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, Diego Novillo <dnovillo@google.com>
Subject: Re: [PATCH] Merge from LTO: eh_personality changes
Date: Thu, 10 Sep 2009 15:50:00 -0000 [thread overview]
Message-ID: <4AA92044.3050800@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.0909101652010.28140@zhemvz.fhfr.qr>
On 09/10/2009 07:52 AM, Richard Guenther wrote:
>> Doesn't seem to work. Instead I tried to fall back to
>> the gcc personality for detecting empty type lists, again setting
>> a cfi personality for all functions we emit. But that doesn't work
>> either (it seems catch (...) doesn't work with the gcc personality,
>> g++.dg/eh/loop1.C fails).
Interesting. I wouldn't have expected that. Though your patch
doesn't seem to indicate that:
> + case ERT_CATCH:
> + /* An empty type list is ok with the default C EH personality. */
> + if (i->u.eh_catch.type_list)
> + return true;
> + break;
> * langhooks-def.h (LANG_HOOKS_INIT_EH): Define.
> (LANG_HOOKS_EH_RUNTIME_TYPE): Likewise.
> (LANG_HOOKS_INITIALIZER): Adjust.
> (lhd_pass_through_t): Declare.
> * langhooks.h (struct lang_hooks): Add init_eh and eh_runtime_type.
> * langhooks.c (lhd_pass_through_t): New function.
...
> * toplev.c (eh_personality_decl): New.
I'm surprised you're not taking the opportunity to make
the eh_personality_thingy a proper lang hook.
> + case ERT_MUST_NOT_THROW:
> + case ERT_CLEANUP:
> + /* Ok with the default C EH personality. */
> + break;
MUST_NOT_THROW is not ok with default personality.
You'll wind up invoking abort instead of std::terminate.
> *** gcc/fortran/f95-lang.c.orig 2009-09-10 13:40:45.000000000 +0200
> --- gcc/fortran/f95-lang.c 2009-09-10 14:18:42.000000000 +0200
> *************** gfc_maybe_initialize_eh (void)
> *** 1155,1164 ****
> return;
>
> gfc_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 ();
> }
> --- 1155,1164 ----
> return;
>
> gfc_eh_initialized_p = true;
> ! eh_personality_decl
> ! = build_personality_function (USING_SJLJ_EXCEPTIONS
> ! ? "__gcc_personality_sj0"
> ! : "__gcc_personality_v0");
Surely Fortran can simply avoid setting this up at all?
> + rtx
> + get_personality_function (tree decl)
> + {
> + tree personality = DECL_FUNCTION_PERSONALITY (decl);
> + tree name;
> +
> + if (!personality&& !eh_personality_decl)
> + return NULL;
> +
> + if (!personality)
> + return init_one_libfunc (USING_SJLJ_EXCEPTIONS
> + ? "__gcc_personality_sj0"
> + : "__gcc_personality_v0");
> +
> + name = DECL_ASSEMBLER_NAME (personality);
> +
> + return init_one_libfunc (IDENTIFIER_POINTER (name));
> + }
Why in the world are you extracting the name and invoking
init_one_libfunc instead of using the DECL_RTL of the function_decl? And
what's with the eh_personality_decl check at this point?
r~
next prev parent reply other threads:[~2009-09-10 15:50 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 13:34 Richard Guenther
2009-09-04 13:37 ` Diego Novillo
2009-09-04 13:41 ` Richard Guenther
2009-09-05 16:37 ` Richard Henderson
2009-09-05 16:38 ` Richard Henderson
2009-09-05 17:24 ` Richard Guenther
2009-09-05 18:11 ` Richard Henderson
2009-09-08 12:37 ` Richard Guenther
2009-09-08 15:20 ` Richard Guenther
2009-09-08 15:49 ` Richard Henderson
2009-09-10 13:12 ` Richard Guenther
2009-09-10 14:37 ` Richard Guenther
2009-09-10 14:52 ` Richard Guenther
2009-09-10 15:50 ` Richard Henderson [this message]
2009-09-10 16:02 ` Richard Guenther
2009-09-10 16:06 ` Richard Guenther
2009-09-10 16:23 ` Richard Henderson
2009-09-11 13:25 ` Richard Guenther
2009-09-11 15:41 ` Richard Henderson
2009-09-11 16:41 ` Richard Guenther
2009-09-11 17:05 ` Richard Henderson
2009-09-13 22:57 ` H.J. Lu
2010-12-29 5:30 ` H.J. Lu
2010-12-29 5:36 ` H.J. Lu
2011-02-08 2:06 ` H.J. Lu
2009-09-10 16:12 ` Richard Henderson
2009-09-10 15:50 ` Richard Guenther
2009-09-10 15:57 ` Richard Henderson
2009-09-08 17:38 ` Eric Botcazou
2009-09-08 15:48 ` Richard Henderson
2009-09-08 16:04 ` Richard Guenther
2009-09-09 9:34 ` Richard Guenther
2009-09-09 15:24 ` Richard Henderson
2009-09-09 15:26 ` Richard Guenther
2009-09-14 2:43 David Edelsohn
2009-09-14 5:38 ` Gerald Pfeifer
2009-09-14 9:37 ` Richard Guenther
2009-09-15 8:15 ` Gerald Pfeifer
2009-09-15 11:48 ` David Edelsohn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AA92044.3050800@redhat.com \
--to=rth@redhat.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).