Fix missing assemble_external in ASM_OUTPUT_FDESC
authorAndreas Schwab <schwab@suse.de>
Fri, 15 May 2020 15:38:30 +0000 (17:38 +0200)
committerAndreas Schwab <schwab@suse.de>
Thu, 4 Jun 2020 07:56:38 +0000 (09:56 +0200)
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

index 8462535d749c5da3625fc02786c987453a61c984..d5acc62cd879159131ba400c1158a2309c47ea2c 100644 (file)
@@ -963,6 +963,7 @@ do {                                                                        \
 do {                                                                   \
   if ((PART) == 0)                                                     \
     {                                                                  \
+      assemble_external (DECL);                                                \
       if (TARGET_ILP32)                                                        \
         fputs ("\tdata8.ua @iplt(", FILE);                             \
       else                                                             \