This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR ada/23957
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Oct 2005 01:49:17 -0400 (EDT)
- Subject: Re: [patch] Fix PR ada/23957
> On Mon, Sep 19, 2005 at 06:14:37PM -0400, John David Anglin wrote:
> > This doesn't work. There's no .IMPORT for it in the .s. Not sure
> > why at the moment, although the define for ASM_OUTPUT_EXTERNAL_LIBCALL
> > assumes assemble_external_libcall is called before the symbol is used.
>
> Hum. Please find out where it gets called for C or C++. There
> ought not be anything special about Ada in this respect...
Moving the call a bit earlier works. The function was returning.
Ok?
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-10-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR ada/23957
* except.c (output_function_exception_table): Call
assemble_external_libcall if we need a personality function.
Index: except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.317
diff -u -3 -p -r1.317 except.c
--- except.c 17 Sep 2005 20:58:14 -0000 1.317
+++ except.c 23 Oct 2005 05:40:07 -0000
@@ -3516,13 +3516,15 @@ output_function_exception_table (void)
int have_tt_data;
int tt_format_size = 0;
+ if (eh_personality_libfunc)
+ assemble_external_libcall (eh_personality_libfunc);
+
/* Not all functions need anything. */
if (! cfun->uses_eh_lsda)
return;
#ifdef TARGET_UNWIND_INFO
/* TODO: Move this into target file. */
- assemble_external_libcall (eh_personality_libfunc);
fputs ("\t.personality\t", asm_out_file);
output_addr_const (asm_out_file, eh_personality_libfunc);
fputs ("\n\t.handlerdata\n", asm_out_file);