This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Merge from LTO: eh_personality changes
On 09/10/2009 09:05 AM, Richard Guenther wrote:
No. It needs it for OMP and the MUST_NOT_THROW regions that generates.
Ah, but we just need *some* personality, not any particular personality,
since we don't have a language spec telling us that we have to call a
particular abort function. Same goes for C.
So you have C and Fortran leave its lang.eh_personality NULL, which
leaves DECL_EH_PERSONALITY NULL, which allows your inliner change to
drop in the C++ (or Ada, etc) personality when needed.
If we arrive at assembly output time in get_personality_function and
find that the function has a non-NULL fun->eh->region_tree, then we
supply the default __gcc_personality_v0. (Note the non-null region_tree
here, since we need *some* personality even to handle cleanup regions at
runtime. But *any* personality can handle cleanup regions, which is why
we don't want to select a DECL_EH_PERSONALITY too early for that case.)
r~