Fix missing assemble_external in ASM_OUTPUT_FDESC

Message ID mvmsgfxims8.fsf@suse.de
State New
Headers show
Series
  • Fix missing assemble_external in ASM_OUTPUT_FDESC
Related show

Commit Message

Andreas Schwab May 18, 2020, 10:02 a.m.
When TARGET_VTABLE_USES_DESCRIPTORS is defined then function pointers in
the vtable are output by ASM_OUTPUT_FDESC.  The only current user of
this is ia64, but its implementation of ASM_OUTPUT_FDESC lacks a call to
assemble_external.  Thus if there is no other reference to the function
the weak declaration for it will be missing.

	PR target/95154
	* config/ia64/ia64.h (ASM_OUTPUT_FDESC): Call assemble_external.
---
 gcc/config/ia64/ia64.h | 1 +
 1 file changed, 1 insertion(+)

-- 
2.26.2


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Comments

Patrick Palka via Gcc-patches June 3, 2020, 10:19 p.m. | #1
On Mon, 2020-05-18 at 12:02 +0200, Andreas Schwab wrote:
> When TARGET_VTABLE_USES_DESCRIPTORS is defined then function pointers in

> the vtable are output by ASM_OUTPUT_FDESC.  The only current user of

> this is ia64, but its implementation of ASM_OUTPUT_FDESC lacks a call to

> assemble_external.  Thus if there is no other reference to the function

> the weak declaration for it will be missing.

> 

> 	PR target/95154

> 	* config/ia64/ia64.h (ASM_OUTPUT_FDESC): Call assemble_external.

OK.  Sorry about the delays.

jeff
>

Patch

diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 8462535d749..d5acc62cd87 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -963,6 +963,7 @@  do {									\
 do {									\
   if ((PART) == 0)							\
     {									\
+      assemble_external (DECL);						\
       if (TARGET_ILP32)							\
         fputs ("\tdata8.ua @iplt(", FILE);				\
       else								\