https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84833

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Just a note, as can be seen e.g. on
static volatile int a;
static int my_foo1 (void) { return 1; }
static int my_foo2 (void) { return 2; }
typedef int (*F) (void);
static F resolve_foo (void) { if (a) return my_foo1; else return my_foo2; }
static int foo (void) __attribute__ ((ifunc ("resolve_foo")));

int
main ()
{
  if (foo () != 2)
    __builtin_abort ();
}
there is no reason why any of the target clones, resolver or the ifunc function
should be .globl, they can all be local to the TU, IFUNC work just fine that
way too.  So, if the function with target_clones attribute is not TREE_PUBLIC,
neither should be any of the multiple_targets.c created symbols.

Reply via email to